Groups | Blog | Home
all groups > macromedia mobile and devices flashlite > december 2004 >

macromedia mobile and devices flashlite : text in button


candyskins
12/30/2004 12:36:39 AM
is it possible to programaticaly change text in a button?what about multiple
text in a button, like a few text panel?is it possible to put text panels in
buttons?

sorry for the confusing questions, but i am trying to do something, and i'm
just starting in flash.

thanks


Tom Krcha
12/30/2004 1:18:34 AM
Yes it is. The components from MM aren't actually components. You have to do
MovieClip, then include the button there without the text label. Then create
the new text label in the MovieClip and assign it some variable name and then
you can assign the label. The button will have some dynamic property to call
which you will assign in another variable. And there is the point, that you
need some function for executing string such EVAL should be. But it isn't I
think. I asked in another thread for this...So I hope there will be some
suggestions.

Tom Krcha
Krcha.com
Justin E-C
12/30/2004 3:32:30 AM
if you are wanting to do it in FlashLite you will need to do the following:

make your button symbol, add a dynamic text field in it and give it the var
name you want. Buttons don't have independent timeline, so the varaible scope
will be the timeline that the button is sitting in.

Just be sure to turn off the field's selectability so that it doesn't
interfere with the hit state. I've uploaded some source for an example. you
can download it at:

http://www.infinitumdesign.com/mobile/dynButtonTxt.fla
AddThis Social Bookmark Button