0 Replies Latest reply on Aug 21, 2007 12:41 AM by manicati

    Problem creating component for Flex in Flash

    manicati
      I have a Problem with the as3 file when creating a component in Flash for Flex.

      Here what I did.
      - I created a Movieclip in Flash and specified a classname "mirrorImage" in the Linkage properties
      - I created a AS3 file mirrorImage.as with the following content:

      package {

      import flash.display.*
      import flash.text.TextField;
      //import mx.core.IUIComponent;
      import flash.display.MovieClip;
      public class mirrorImageHome extends MovieClip {

      private var testTXT:TextField;

      public function setText(testX:String):void {
      testTXT = new TextField();
      testTXT.text = testX;
      }
      }
      }



      So this is the problem: When I export the MovieClip as SWC and import it in Flex, Flex does not recognize the new component, however if I export the SWC without the AS3 file Flex recognizes the new component.

      NB. Flash does not show an error when I export the MovieClip with the AS3 file.

      What did I wrong?