peaches
09-28-2008, 03:40 AM
This covers both Flash and Flex, so I decided to post here, instead of in either of the other forums. If I'm off-topic, so sue me, I'm new here ;)
I was to publish code using flex, and pure-content using flash. I've worked out a system, but there's a kink.
Here's my project tree:
src/
flex/
mentalpicture/
App.as
LinkedView.as
flash/
view.fla
mentalpicture/
LinkedView.as
www/
app.swf
view.swf
App is the base Sprite for the Flex app. He creates a Loader object, and loads view.swf. He explicitly ensures that LinkedView is included in app.swf.
view.fla contains a symbol that attaches "LinkedView" in its linkage settings. The LinkedView.as in the flash branch is just a stub that trivially subclasses MovieClip.
At runtime, ApplicationDomain magic correctly uses the LinkedView definition compiled with flex, and ignores the stub. Hurray!
My question - is there a way to not have to create that stub? If I remove it, flash coughs at the linkage pane. If the document class is undefined flash "generates one" so it isn't a problem, but the same rule apparently doesn't apply to classes linked to library symbols :confused:
I was to publish code using flex, and pure-content using flash. I've worked out a system, but there's a kink.
Here's my project tree:
src/
flex/
mentalpicture/
App.as
LinkedView.as
flash/
view.fla
mentalpicture/
LinkedView.as
www/
app.swf
view.swf
App is the base Sprite for the Flex app. He creates a Loader object, and loads view.swf. He explicitly ensures that LinkedView is included in app.swf.
view.fla contains a symbol that attaches "LinkedView" in its linkage settings. The LinkedView.as in the flash branch is just a stub that trivially subclasses MovieClip.
At runtime, ApplicationDomain magic correctly uses the LinkedView definition compiled with flex, and ignores the stub. Hurray!
My question - is there a way to not have to create that stub? If I remove it, flash coughs at the linkage pane. If the document class is undefined flash "generates one" so it isn't a problem, but the same rule apparently doesn't apply to classes linked to library symbols :confused: