Top Level Namespace

Defined Under Namespace

Modules: FlashPlayer, FlashSDK, Sprout Classes: Dir, String

Instance Method Summary (collapse)

Instance Method Details

- (Object) adt(*args, &block)



221
222
223
224
225
# File 'flashsdk/lib/flashsdk/adt.rb', line 221

def adt *args, &block
  exe = FlashSDK::ADT.new
  exe.to_rake(*args, &block)
  exe
end

- (Object) amxmlc(*args, &block)



23
24
25
26
27
# File 'flashsdk/lib/flashsdk/amxmlc.rb', line 23

def amxmlc *args, &block
  exe = FlashSDK::AMXMLC.new
  exe.to_rake *args, &block
  exe
end

- (FlashSDK::AsDoc) asdoc(args, &block)

Create a new Rake::File task that will execute FlashSDK::AsDoc.

Examples:

The following is a simple AsDoc task:

desc "Compile the SWF"
mxmlc 'bin/SomeProject.swf' do |t|
  t.library_path << 'lib/corelib.swc'
  t.input = 'src/SomeProject.as'
end

desc "Generate documentation"
asdoc 'docs/' do |t|
  t.doc_sources << 'src'
end

Returns:



149
150
151
152
153
# File 'flashsdk/lib/flashsdk/asdoc.rb', line 149

def asdoc args, &block
  exe = FlashSDK::AsDoc.new
  exe.to_rake args, &block
  exe
end

- (Object) compc(args, &block)



116
117
118
119
120
# File 'flashsdk/lib/flashsdk/compc.rb', line 116

def compc args, &block
  exe = FlashSDK::COMPC.new
  exe.to_rake(args, &block)
  exe
end

- (Object) fdb(*args, &block)

Rake task helper that delegates to the FDB executable.

fdb 'bin/SomeProject.swf' do |t|
  t.break << 'com/foo/bar/SomeClass.as:23'
  t.continue
  t.run
end


762
763
764
765
766
# File 'flashsdk/lib/flashsdk/fdb.rb', line 762

def fdb *args, &block
  fdb_tool = FlashSDK::FDB.new
  fdb_tool.to_rake *args, &block
  fdb_tool
end

- (Object) flashplayer(*args, &block)



146
147
148
# File 'flashsdk/lib/flashplayer/task.rb', line 146

def flashplayer *args, &block
  FlashPlayer::Task.define_task *args, &block
end

- (Object) library(pkg_name, name = nil, version = nil)

From within a Rakefile, you can load libraries by calling this method:

library :asunit4

Or, if you would like to specify which registered library to pull from the identified package (by name):

library :asunit4, :src

Or, if you'd like to specify version requirements:

library :asunit4, :swc, '>= 4.2.pre'

It's important to note that libraries must also be defined in your Gemfile like:

gem "asunit4", ">= 4.2.pre"

Libraries are generally then added to compiler tasks as Rake dependencies like:

mxmlc 'bin/SomeRunner.swf' => [:asunit4] do |t|
  t.input = 'src/SomeRunner.as'
  t.source_path << 'test'
end


251
252
253
# File 'sprout/lib/sprout/library.rb', line 251

def library pkg_name, name=nil, version=nil
  Sprout::Library.define_task name, pkg_name, version
end

- (FlashSDK::MXMLC) mxmlc(args, &block)

Create a new Rake::File task that will execute FlashSDK::MXMLC.

Examples:

The following is a simple MXMLC task:

desc "Compile the project"
mxmlc 'bin/SomeProject.swf' do |t|
  t.input = 'src/SomeProject.as'
end

Returns:



150
151
152
153
154
# File 'flashsdk/lib/flashsdk/mxmlc.rb', line 150

def mxmlc args, &block
  exe = FlashSDK::MXMLC.new
  exe.to_rake args, &block
  exe
end