|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello,
I would like to create a button with a dinamic text inside, just to have a generic button object, with text effect on mouse over and out, that I can have different instances with different text. I have tried it, but don't work. It's that possible? Must I create always new button objects for every different text button with the same effects on mouse over and out? Thanks! |
|
#2
|
|||
|
|||
|
hmm... you could try using external text file. be sure to give your dynamic text a variable name.
|
|
#3
|
|||
|
|||
|
well, i have found myself a solution to make this:
to make this we must create a button with a movie. (we must define its behaviour with as, rollover and so on) Then we can define variables for text values, or define them from the _root. ![]() By this way we can have a unique button object width different instantiated texts. ![]() |
|
#4
|
|||
|
|||
|
Create a movie clip.
Inside, on layer 1 place a dynamic text field and give it a variable name (ex. textField) On layer 2 (below layer 1) create a button. Can be blank with just a hit state. Script the button to your needs. In the first frame of _root write a function: Code:
function buttName(name){
textField = name;
}
Place the movie clip you created earlier, on the stage and give it this script: Code:
onClipEvent(load){
_root.buttName("nameOfThisButton");
}
Test your movie. |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Button with a dinamic text inside? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|