Hi Tony,

there are frames in a mtasc-based swf as well as in a swf-file created
with the Flash-IDE.
In fact, everything that mtasc does (as I understand it), is to inject
code into a specified frame of a swf file. You can specify into which
frame to inject your code by using the "-frame X" commandline option.

On my current project, I am using the flash ide to export my assets
(instead of swfmill) and mtasc to inject my classes. I do the
following:

1.) Create my assets in the Flash IDE as symbols in the library. Then
"export for Actionscript" them - but not into the first frame! Put an
instance of each exported Symbol to a frame between 10 and 20.

2.) write my code using eclipse and ASDT. compile with MTASC using
Flashout for that and inject all my code / classes to frame 1. My code
includes a preloader. The preloader has a gotoAndStop(30) to jump
behind the exported symbols after TotalBytes==LoadedBytes. It has to
go behind frame 10-20, because exported symbols are only available
behind their first instantiation.

If you need a preloader for your classes/code instead of assets, you
might try to inject the class containing your preloader to frame 1 and
inject the other classes to frame 2 and jump to frame 3 after
preloading.

I don't know, when classes are loaded by the FlashPlayer exactly? Can
someone explain? Are they loaded on "import com.path.to.class"?

Have fun!
Matthias

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to