View Full Version : copied instance names
Easy question: Can Actionscript recognize two seperate yet identical buttons with the same instance name?
As of right now I can only get copy 1 (as it is called in the properties frame) to work and not copy 2.
each object should have a 'unique' instance name
Sualdam
08-01-2003, 05:14 PM
Why on earth (:)) would you want the same instance name?
I think - and I emphasise 'think', because I have never wanted to do it - that you can't.
To be honest, I never thought about it because it would be very bad programming practice.
<edit - echoing tg>
@sualdam: your footer gets more and more colorful each day.
Sualdam
08-01-2003, 05:17 PM
Once I get a decent #6 and #7 I'll be happy :)
I wish we had Flash footers enabled - it'd take up far less space... ;)
hehhehheh .o0(i can just see it now)
smoke10010
08-06-2003, 04:46 AM
have a different similar name and have them call a "for" loop to have them all do what you want at once
The reason why I wanted that to happen was because I replicated the neck on a guitar and show each possible note. Each note is link to a .mp3 file. The mp3s are accessed with a function that reads the instance name of the particular note clicked and then calls the appropriate .mp3. As you may know the same note can be played in up to 6 different places on the neck of a guitar, hence the replication of the instance names. I solved the problem, though. The function contained three nested loops to name the functions that calls the .mp3 of the same name. I added a fourth loop to the naming but dropped the fourth variable on the .mp3 call. Works like a charm. I may post the code later.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.