actionscript 3 - AS3 alternatives to *_exclude.xml files, loading class definitions dynamically -



actionscript 3 - AS3 alternatives to *_exclude.xml files, loading class definitions dynamically -

i've been banging head against wall couple days , hoping can point me in right direction.

working in very big flash application, in as2/cs3 have setup following:

root.swf -- modules ---- code_a.swf ---- code_b.swf -- views ---- view_a.swf ---- view_b.swf

using _exclude.xml files, exclude classes defined in code_a , code_b ouptut .swf of view_a , view_b. root.swf responsible loading code modules before view_a or view_b, ensuring class definitions view_a , view_b depended on existed.

the problem

we've migrated using actionscript 3/cs5. *_exclude.xml files no longer exist. same functionality above, i've tried following:

my setup looks like:

root.swf -- modules ---- class_a.as ---- class_b.as -- views ---- view_a.swf ---- view_b.swf

use mxmlc compile root.swf, view_a.swf , view_b.swf, passing -externs alternative specify classes loaded externally (the 2 classes in modules). ensures class excluded compiled swf.

use compc compile class_a.as , class_b.as classes.swf, using -directory=true access library.swf external loading.

however, when seek running 1 of 2 view files depend on classes.swf, runtime errors telling me class definition not present.

current workaround

i've devised workaround i'm not happy it's backwards modular approach using:

rather loading code modules, statically link class definitions required kid movies root.swf. when building root.swf, utilize -link-report alternative of mxmlc provide list of included classes. when building kid swfs, can utilize -load-externs ensure class definitions exist not included in compile output.

is there way aware of replicate as2/_exclude.xml solution had using as3/cs5?

i'd recommend compiling shared libraries swcs.

there other options such rsls:

http://help.adobe.com/en_us/flex/using/ws2db454920e96a9e51e63e3d11c0bf674ba-7fff.html#ws2db454920e96a9e51e63e3d11c0bf69084-7f1e

hope helps.

actionscript-3 flash-cs5 mxmlc compc

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -