0 Replies Latest reply on Apr 7, 2008 11:01 AM by Handycam

    Using SWCs and SWFs in Flex 3

    Handycam Level 1
      Ok, I'm a bit confused. I am creating a graphic rollover/audio project in Flash CS3 that I want to use in my Flex app. I need to have full interactivity with the Flash content, the user rolls over graphics and certain audio files play.

      What's the best way to do this, with a SWC as a component or a SWF in a SWFLoader?

      In a couple of tests I did, I was able to get a simple test interactive SWF to load and function. However, my SWC loads as a static file; the actionscript 3 interactivity added in the Flash CS3 timeline did not function.

      My test FLA file is a movie clip on the stage "boxes". I have set the "export for AS" for this library item, not sure if that was needed. Inside "boxes" movie clip are two movie clips "boxG" and "boxO". "boxo" is alpha = 0.

      My code is on frame 1 of the main timeline:


      function mouseHandler(e:MouseEvent):void {
      this.boxes.boxO.alpha = 100;

      This works in the SWF but not the SWC. What am I missing about the SWC, and should I try and use it or stick with the SWF?