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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

actionscript syntax question

Status
Not open for further replies.

starblood

Technical User
Feb 28, 2001
63
GB
If I have two lines of code:

PickClip = Math.round(Math.random()*5) + 1;
_root.countingvalue = /swing5:variable_counter;

The second line works as it is but how do I change the syntax so that "5" in the path is replaced with the random number "PickClip"?
 
It's OK - I played around and got it to work:

_root.countingvalue = _level0['swing'+ PickClip].variable_counter;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top