[flash cs4] - swc and code execution

Hi! I’m trying this:

  • create some asset in library, export for as in frame 1
  • export an assets.swc, and set the relative library path publish option in othes flas that use assets.swc
  • Then, there’s a Main.as document class that uses other classes tha use the assets in assets.swc

Problems start when some asset has some code inside. Say, a button with stopped event states. Well, the stop() commands don’t get executed, so the buttons are effectively instantiated, but their timeline plays until the end. Probably because they’re not initialized in the timeline (being exported in frame 1, so, in fact, before).

Usually, without swc, to solve this problem one would put all assets in frame 2 and then check for cuttentFrame == 3 (http://www.8bitrocket.com/newsdisplay.aspx?newspage=10807). This is what I’d really like to avoid. And from here the question: is that possible? Is there a way (in flash, not flax) to use swc to properly get assets containing some simple code (usually stop commands) in their timeline?

:slight_smile: