1 Reply Latest reply on Sep 14, 2009 8:04 PM by phil1943

    import mx component into AS class

    phil1943 Level 1

      Hello, I am trying to import an MXML custom component into an Actionscript class.

      It wont let me.

      Is this possible, or can you only import other AS-Flex extended classes into an AS class ?

       

      eg

      my folder/file structure is as follows:

       

                              mainFlexApp

          CustomMXComponents                    CustomASClasses

      myCustomMXMLComponent                myCustomASClass

       

      I need to import myCustomMXMLComponent into myCustomASClass.

      myCustomMXMLComponent being a pure MXML component.

       

       

      Thanks for any help.

        • 1. Re: import mx component into AS class
          Leonardo França Level 1

          try this

           

          import yourfolder.myCustomMXMLComponent;

           

          public class myCustomASClass extends myCustomMXMLComponent

          {

          ...

           

           

           

          --

          Leonardo França

          Adobe Certified Expert Flex 3 with AIR

          Adobe Certified Expert Rich Internet Application Specialist v1.0

          Adobe Certified Expert Flash CS3 Professional

          Certified Professional Adobe Flex 2 Developer

          Adobe Certified Professional Flash MX 2004 Developer

          http://www.leonardofranca.com

          http://twitter/leofederal

          Manager AUGDF - Adobe User Group do Distrito Federal

          http://www.augdf.com.br

          http://twitter/augdf

           

           

           

           

          phil1943 escreveu:

          Hello, I am trying to import an MXML custom component into an Actionscript class.

          It wont let me.

          Is this possible, or can you only import other AS-Flex extended classes into an AS class ?

           

          eg

          my folder/file structure is as follows:

           

                                  mainFlexApp

              CustomMXComponents                    CustomASClasses

          myCustomMXMLComponent                myCustomASClass

           

          I need to import myCustomMXMLComponent into myCustomASClass.

          myCustomMXMLComponent being a pure MXML component.

           

           

          Thanks for any help.

          >