Instance names

Hello.

I am currently building a menu (which i unfortunately can’t paste the fla here) and was wondering if someone could give me a little advice. I have it set up that the movie will duplicate itself upon loading and therefore I can’t select the multiple graphics while designing in flash because they technically dont exist yet…

What I need to know is how can I refer to “instance names” in a/s and tell it to load a specific movie on press/release on that instances graphic? It might be very simple but I can’t seem to find the answer.

Please let me know if I’m not making myself clear and I might have to try to post my fla later then. Thank you very much.

Thanks.

:love:

are you trying to do something like this?

this[myVar].onPress = function() { } 

…where the instance name goes in ‘myVar’? :slight_smile:

that isn’t doing it… its saying


Frame=1: Line 17: Statement must appear within on/onClipEvent handler
     this[menu0].onPress = function() {

and so i add


onClipEvent (enterFrame) {
this[menu0].onPress = function() {
	loadMovieNum("menu.swf", _level10);
}}

and it runs without errors until i click a button and then i get something that says


name: menu0
buttontext: Main

Because there’s a line in the a/s that says


MovieClip.prototype.DoSomething = function (theClip) { trace ("name: "+theClip._name);trace ("type: "+theClip.mov.txt);};

so i figure if i could even take the ‘dosomething’ or the ‘theClip.mov.txt’ then i should be able to assign different actions to the different variables… am i talking jibberish here???