0 Replies Latest reply on Jan 30, 2008 8:19 AM by Yonkey

    Embedded SWF in Flex Builder 3


      I am trying to separate my graphics from the code for an application. Currently, my graphic library are contained in a Flash CS3 swf. I have a symbol exported for ActionScript, and I'm currently embedding it in my application via the following code:

      [Embed(source='../assets/graphicAsset.swf', symbol='item')]
      private var Graphics:Class;
      private var _graphics:MovieClipAsset;
      (inside constructor) {
      _graphics = new Graphics();

      The problem arises when I have an animation inside the item movieclip within graphicAsset.swf. I have a simple multi-frame tween that eventually terminates with a keyframe containing the code "stop();"

      Since Flex seems to remove all code from embedded swf's, when I try using _graphics.gotoAndPlay("animation"); the animation never sees that stop(); code, and endless loops through all frames in the movieclip.

      Does anyone know how to retain simple AS1 code like stop() when embedding movie clip assets?