| 12:20 am on Mar 9, 2005 (gmt 0)|
If your text properties of the button (color, weight, etc.) aren't going to change when the button is rolled over or clicked, I would suggest just making the actual button, and NOT the text, the actual button symbol. Then in the movie frames you can just use the text tool to place the different text phrases over the various instances of the symbol.
That's the easiest way I can think to do it, short of having to create a different button symbol for each button.
| 12:45 am on Mar 9, 2005 (gmt 0)|
Thanks for the suggestion, but I only want the text to appear in the over state of the button.
I can't believe that something as simple as this is so complicated! What's the point in creating a 'button' symbol, if every one has to look identical?
| 12:51 am on Mar 9, 2005 (gmt 0)|
Actually, I suppose the fact that they look the same is exactly the point!
But you should at least be able to change the text on the buttons?! How far would user interface designers get if every dialog box could have buttons, but they all had to say the same thing!
"Would you like to delete this file? Click YES or YES to continue."
... anyway - this has turned into a rant! Any other ideas?!
| 4:22 pm on Mar 11, 2005 (gmt 0)|
You could try using actionscript to change the text of the button. Add a dynamic text box on the button and then just add a script on each button to display different text...
| 4:27 pm on Mar 11, 2005 (gmt 0)|
PizdusInc, read the first post ......
Balloon - your AS looks ok, but as your are putting it on the main timeline it maybe the reference to 'this' that is causing the problem.
_root.ButtonInstance1.TextInstance.text = "This is a test";
| 5:54 pm on Mar 18, 2005 (gmt 0)|
I do something like this with buttons in a flash animation I have.
I define the text in my button dynamic text and give it the variable lvlmenu0text
I put an action in the frame (still in the button_)that says
lvlmenu0text = lglmenu0text;
then.. in the instances of the button in my main movie .. I set the variable that's to be displayed.. as an action in the keyframe as:
lilmenu01.lglmenu0text = "some button text here";
lilmenu02.lglmenu0text = "more darn text";
where lilmenu01, lilmenu02 etc.. is the name of the instance of the button.
there are probably easier ways of doing it - but this seems to work for me.. oh.. and I think my button is actually defined as a movie clip - but I'm not sure if this matters..
hope this has helped
| 7:49 pm on Mar 18, 2005 (gmt 0)|
Stratus hit the nail on the head. You can not place text inside a button symbol and have it display dynamic text.It doesnt work. 99.9% of all flashers I know, including myself, build a movieClip with a button inside that. Inside the movieClip is where you put your dynamic text.
So, the AS would be:
The button AS would be:
//whatever action you want to happen