PDA

View Full Version : using attachMovie then grouping all movies made


chris_angell
09-12-2007, 11:52 AM
I am using attach movie to ctreat a selection of movies..

_root.attachMovie("image", "image" + i, i);

but i would like to group these in a movie clip i can control (a parent movie clip) but when i try this

_root.parentMC.attachMovie("image", "image" + i, i);

it doesn't work... i want to move all the movieclips i make.. but at once so i want to put them in a holding mc

I WANT TO DO THIS.

_root.parentMC.attachMovie("image", "image" + i, i);

THIS LOOPS

then i can move all the movies just made... ???

_root.parentMC._x = "400"

any help will be great

:)

angelinbnv
09-15-2007, 09:05 PM
Go to your library, right-click on the movie that you want to multiply an click on Linkage. Make sure that you have an identifier for that movie clip... (let's say "testMC").
"Export for ActionScript" and "Export in first frame" must be checked.

Assuming that you have a "parentMC" on stage, the code looks like this:


i=0;
while(i<5) {
parentMC.attachMovie("testMC", "testMC" + i, i);
newMC = eval("parentMC.testMC"+i);
newMC._x = 0;
newMC._y = 10*i;
i++;
}
parentMC._x = 400;


I hope that helps.