PDA

View Full Version : Can anyone tell how to get the ID name from an MC on the stage?


soggybag
02-28-2003, 06:56 AM
Can anyone tell how to the Linkage Identifier from an item already on the stage?

avatar
02-28-2003, 02:01 PM
Hi,

First put the MC on the stage with attachMovie.

myMC.attachMovie( "idlinkname", "newname", 2 );

Than you can target the MC ... myMC.newname

tg
02-28-2003, 03:26 PM
don't know how you would find the 'linkage name' of an item on your stage, but the 'instance name' is contained in the '_name' property of your mc.

so if you do: trace(this._name); it will trace the instance name of this.

soggybag
02-28-2003, 03:46 PM
I'm not sure if this is possible. But here's why: I have arranged a bunch of MCs on the stage so I can place visually, I find this easier to work with. But I want to add scripts to them using the actionScript component and Object.registerClass. This means I have to attach them to the stage.
So I made a script that will replace each clip on the stage stage with an instance of the same clip, but when attachedd these scripts have all of the necessary actionScript stuff.

farafiro
02-28-2003, 05:41 PM
don't think it can be done at all, but if u wanna do a tricky thing, make the linkage name is the same of the instance name then do as tg suggested

flavoredthunder
03-02-2003, 10:13 PM
If i were you i'd make to movies, an editor and a player. In the editor clip you'd layout all your movies in the placement you'd like. Then you'd write a for loop to save all the locations of the scripts to an array. then store that array in your playback movie and you can attach the movies to the place on the screen you want but also with the code you desire.
Good Luck!