Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pretty simple actionscript, I just cannot get

Status
Not open for further replies.

seanmcdonough

Programmer
May 5, 2003
2
US
Hi, I have a button on my page, and when I click on the button, I want a '1' to appear in a dynamic text field. That's it.


And...If you're feeling slightly more ambitious; I wanted to know how, when you hit another button, that dynamic text box has all the text removed.
 
text box with varaible name count

on (release){
count = 1;
}


other button

on (release){
count = "";
}
 
in the properties inspector (firstly click on the dynamic textfield) you can enter the name of the variable that should be displayed.

put _root.myvariable
in it (myvariable may be replaced by the name you choose).

put this on the first button:
Code:
on(release){
_root.myvariable=1;
}

on the second button:
Code:
on(release){
_root.myvariable="";
}

regards

tektips.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top