Adobe Dreamweaver Forums



Last 10 THreads :         Software Licence Transfer Debacle (Last Post : Judy Arndt - Replies : 1 - Views : 2 )           »          loop over query (Last Post : chrispilie - Replies : 0 - Views : 1 )           »          Adobe latest FreeHand MX upgrade, Would you pay? (Last Post : Pen Craft - Replies : 138 - Views : 139 )           »          Default selection of link bar control (Last Post : D_Saito - Replies : 1 - Views : 2 )           »          Java script message (Last Post : dzedward - Replies : 1 - Views : 2 )           »          Controlling SWFs with dynamic lengths (Last Post : rossimo - Replies : 2 - Views : 3 )           »          Minimum order on a shopping cart? (Last Post : Murray *ACE* - Replies : 1 - Views : 2 )           »          Joing Fields from 2 tables (Last Post : kplandry - Replies : 0 - Views : 1 )           »          Multiple domain names (Last Post : SIZR Studio - Replies : 2 - Views : 3 )           »          Centering
in 2008 (Last Post : Michael Fesser - Replies : 16 - Views : 17 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags:

Reply
  #1 (permalink)  
Old 05-12-2008, 10:42 AM
sammy545
 
Posts: n/a
Diggs:
Default 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);
}
}
}

Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-12-2008, 10:42 AM
atta707
 
Posts: n/a
Diggs:
Default 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?
Reply With Quote
  #3 (permalink)  
Old 05-13-2008, 05:41 AM
sammy545
 
Posts: n/a
Diggs:
Default 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

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 06:36 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk