Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
sammy545 #1
Trying to get an Action Script 3.0 class to work
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.
package
{
import flash.display.Sprite;
import flash.events.Event;
import fl.data.DataProvider;
import fl.controls.List;
import fl.controls.ComboBox;
import fl.core.UIComponent;
import fl.events.ListEvent;
public class LabelButtonExample extends Sprite
{
public function LabelButtonExample() {
var myIcon:IconWithToolTip = new IconWithToolTip();
myIcon.setStyle("icon", MyIcon);
myIcon.iconDescription = "Icon Description";
myIcon.move(50,50);
addChild(myIcon);
}
}
}
sammy545 Guest
-
CF Grid / Java Script / Action Script
Hi, Does anyone know of a good reference for the attributes CFgrid exposes in a flash form? eg. I would like to select the first row on load. ... -
Another M$ Class Action Suit Settled
Microsoft Corp. A $31.5 million settlement has been granted preliminary approval in the class action lawsuit filed on behalf of consumers and... -
is freehand a class action waiting to happen?
I wonder if there are as many ship-jumpers on the Adobe forums as there always seem to be on Macromedia's? I manage to get around in Freehand 10... -
Class Action Lawsuit against Macromedia?
sometimes, I wish.... How many Flash developers have imagined suing Macromedia for countless hours of wasted time due to bugs and inadequate... -
Action Script Class text box
I was doing a tutorial in flash Pro mx 2004 but i was unable to find the Action Script Class text box... does any one knows where is it??? The... -
atta707 #2
Re: Trying to get an Action Script 3.0 class to work
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?
atta707 Guest
-
sammy545 #3
Re: Trying to get an Action Script 3.0 class to work
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
sammy545 Guest



Reply With Quote

