All ActionScript is removed on frames.  However, if you use Flash 9 Alpha (Blaze), you can still interact with it.
 
If you don't use an AS3 class, then you still have primitive controls such as gotoAndPlay, currentFrame, etc.  There are some new ones that are pretty phat too, like currentLabel, labels array, etc.
 
The amount of intergration you need is what really dicatates how far you want to go.
 
1. Just want a neat button?  Use Flash 8 or below.  Make a class that extends UIComponent, embed the SWF to a property, and in createChildren, attach the SWF class.
 
2. Want to control the SWF's state?  Since your states are removed, in the above example, you'll have to code the "gotoAndPlay('someLabel')" yourself.  It's better if you just make an AS3 class, and code that yourself.  If you use Blaze, all of your MovieClips are now AS3 classes you can use.  You just embed the SWF and snag the class from it.  Or you can embed the SWF to the class, and instantiate the class (I like the latter).
 
3. Want full Flex integration with states, icons, labels, focus management, and events?  Then you'll need to make your buttons after the skin states in the button such as upSkin, overSkin, selectedSkin, etc.  Since you can embed SWF's for skins, you can do this all in CSS.  The downside here is your transitions aren't always seemless as they are with #1 & #2.  However, functionality & usability is maintained.
 
I personally think #3 comprimises art too much.  #1 makes your buttons dumb.  I like #2, but most designers won't know how to easily get those classes into Flex, nor want to code in AS3 to make a simple gotoAndPlay working.  Currently working on ways to make #2 easier for designers.
 
----- Original Message -----
Sent: Saturday, July 15, 2006 10:01 AM
Subject: [flexcoders] what can you do with emedded swf symbols as button icons and as buttons

I want to make buttons and use symbols from a swf as my icon in the button.

my question is that as I understand it, you can only embed buttons and movieclips, not graphics, and presumably (though I am not sure about this) not bitmaps.

So if you can embed a movieclip, what can you do with it in a button when it is an icon? can you change it's state or access any of the elements within the clip, change frames, etc?

This actually begs a larger question which is can I embed a movieclip or button in a canvas and use it as a button. In flash the given object already knows what to do to highlight itself when there is a rollover, etc. How could I take buttons that I have developed in flash and get the hit results back to flash.

Hank
__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to