|  | Changing button text in actionScript |  | |
| | | SecretSanta |  |
| Posted: Tue Jul 22, 2008 4:36 pm Post subject: Changing button text in actionScript |  |
| how can I make the button text change when I rollover it? is there a way to do this? |
| |
| | | PIPSproject |  |
| Posted: Thu Jul 24, 2008 9:34 am Post subject: Re: Changing button text in actionScript |  |
I have just had a go at this myself. Note: rollOver doesn't work on a main movie on _root (whatever that means - I'm a bit rusty), so the button needs to be within a movie clip.
I have a movieclip containing a button 'b1' and a dynamic text field 'b1Text'. I then attached the code to the button:
on (rollOver) { b1Text.text = "New Text"; } on (rollOut) { b1Text.text = "Original Text"; } |
| |
| | | K0raX |  |
| Posted: Thu Jul 24, 2008 9:48 am Post subject: Re: Changing button text in actionScript |  |
I think he was refering to the button's text changing?
If that's the case, then you should double click that button and see that it contains 4 frames: Up, Over, Down and Hit... go to the over frame and add a keyframe and just change the text. |
| |
|
|