2 Replies Latest reply on May 6, 2009 1:30 PM by stephan.k

    How to use Flash Library items in Flex Builder (AS Project)?  Workflow?

    stephan.k Level 1

      Dear Forum


      Basic Workflow:
      I'm using Flash IDE to design the movieClips, export the flash file as one .swc file and then use Flex to do the coding.   (love all the code hinting!)


      The Flash Library Asset:
      The library contains a box movieClip (Box)  which in itself contains a backgroundMC movieClip with the instance name backgroundMC. The baseclass for Box is Box.as which extends MovieClip.  I plan to add a lot of functionality to the Box.as class...


      The Challenge:
      Let's say I would like to put a box movieClip from the Flash Library on the stage and then vary the alpha of its backgroundMC :


      b = new Box();
      b.backgroundMC.alpha = 0.3;


      The Problem:
      The above works fine if I use flash.display.MovieClip as the baseclass.  Flex Builder's codehinting finds the backgroundMC instance without a problem.   But as soon as I create a custom class called Box.as, all the code hinting in Flex Builder for Box() disappears.  No error is thrown, the box appears on the stage but the b.backgroundMC.alpha line fails silently.


      The Question:
      How can I use Flash library items with custom base classes in the Flex Builder environment (for Actionscript projects)?



      Any insight or leads are as always much appreciated.