Flash MX 2004 Button and text changing.
Hi All:
I have created a MC to use as button. In the MC is a textfield set to dynamic. I want to be able to change the text on the button but can't find the path. I've tried target and that gives me this.myButton I need to get further down than that I think. I've just got into Flash coming from Director/VB/C. Once I get the syntax it'll be good. As usual none of the books I've read have an example. Button is one layer, actions is another that's all in the IDE.
Help greatly appreciated,
Thank you.
Ok got that bit more help needed
Thanks JoeJoe2288:
The code you gave me works in the timeline of the button but does nothing in the timeline of Actions.
In the program I'm trying to write the buttons are containers for words for the student to recognise and then will be change on a press on a continue button.
code:
function displayWord():Void {
var nRnd:Number = Math.round(Math.random()*2);
switch (nRnd) {
case 0 :
this.txtWord1.text = aWords[aRandomNumber[nCounter]];
this.txtWord2.text = aDis1[aRandomNumber[nCounter]];
this.txtWord3.text = aDis2[aRandomNumber[nCounter]];
break;
// and so on
This is the code I have for using just textfields on the stage. It works but a textfield isn't a button. Hope that explains it more clearly.
Thank you,
Indoda