2 Replies Latest reply on May 12, 2008 4:20 AM by sammy545

    Trying to get an Action Script 3.0 class to work

    sammy545
      I have been trying to get this example that comes with the flash CS3 documentation to work. In step 1, when it says to add the List and Button components to the library, does that mean to open 'components' and drop a List control and a Button control to the library. If so, do I need to do anything with these controls after I do this? Also, when it says to create an Icon symbol and name it 'myIcon'. Does this mean that I drop a square onto the canvas in the .fla file and then convert it to a symbol. Do I name the new symbol 'myIcon' or do I name the instance, which is in the property inspector to 'myIcon'. Sammy


      To run the example, follow these steps:

      Add the List and Button components to the library.
      Create an icon symbol and name it MyIcon.
      In the symbol properties for MyIcon, toggle the option "Export for ActionScript".
      Save this code as LabelButtonExample.as in the same directory as your FLA file.
      Set the Document class in the FLA file to LabelButtonExample.
        • 1. Re: Trying to get an Action Script 3.0 class to work
          atta707 Level 2
          I don't know anything about FLA.

          what are trying to achieve in Flex? An icon with a tool tip? Have you looked into Image class and it's toolTip property?
          • 2. Trying to get an Action Script 3.0 class to work
            sammy545 Level 1
            I would like to be able to create pure action script class files to be used in Flex 3. The problem I've been having is getting even documented sample code (classes), such as the one above, to run properly in both, flex and flash. I would prefer running classes such as the one listed strictly in flex, but figured that for learning purposes it would be easier to use flash. I am unsure if I would be better off testing all of my action script classes through flex. I am hoping that once I get these sample code (classes) to display properly, I can start dissecting them, in order to fully understand how they work. I'll also look into the image class and the tool tip property to see if I can find any addtional information. Sammy