Multiple instances of one Movieclip
Hi! I'm trying to do a drag and drop game, where I have to drag the same movieclip several times...
can anyone please help me?? how can i do that??
Thanks!!!
Hi! I'm trying to do a drag and drop game, where I have to drag the same movieclip several times...
can anyone please help me?? how can i do that??
Thanks!!!
You'll have to create new instances of the movieclip. To do that, right click the movieclip in the library and select Linkage. In the window that opens up select the Export forActionscript option and the movieclip's library name will appear where it says "Class"... change that to whatever you like (classes are normally named with a leading capital letter)... let's say you assign it a class name of "MyMC"
To create a new instance what you need to do is use:
var newMC:MyMC = new MyMC();
addChild(newMC);
and then you'll have to asign whatever event listeners and whatnot you need for what you plan to do with it.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.