Controling Duplicated Movie Clips
please could some one help me as this has been bugging me for days now.. i have duplicated a movie clip with the following lines :
for (i=0; i<=nosBoxes; i++) { _root.box.duplicateMovieClip("box"+i, 1); }
Now what i can't work out is how to contol/position the newly created boxes..
Also do you know where i could get some decent tutorials on scripting interactive graphics, i can't find any anywhere!! Any help would be greatly appreciated.
FlashKit > Flash Help > Flash General Help
Posted on: 01-09-2003, 05:57 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Controling Duplicated Movie Clips
hi, i'm developing a shooting game, in which i am duplicating the bullet (ship) to shoot at a guy.
i have an array as you can see here.
Code:
for (i=1; i<=50; i++) {
_root.ship[i] = new shipparent();
duplicateMovieClip(_root.ship, "ship"+[i], i);
_root.ship2._x = _root.gun._x;
_root.ship2._y = _root.gun._y;
}
}
in stead of using ship2, i would like to use what ever is the next unused ship... and im not quite sure how to do this.
does any body else know?
thanks a bunch
Controling Movie Clips
How can I tell a movie clip to go to a certain frame if an external swf file is loaded in a certain level?
Controling Movie Clips
first i want to say thx for taking a look at this post.
ok I have uploaded a screenshot so you can see what i'm working on but not sure how the boards handle them so here is the url-> http://www.liveslate.com/brad/suit.jpg
ok so here's what i would like to do and would appreciate ANY help possible.
I would like to have the red circle be dragable over the smaller image and control the movie to the rights position so that the location of the circle is enlarged to the right.
I plan on the text at the bottom and at the left being one movie clip that changes the information given when certain areas are highlighted. which i believe i know how to do.
can someone please give me a point in the right dirrection? If it is helpfull i can supply the beginnings of the fla that i have created.
i only have about a week and a half to get this figured out so any help would be appreciated more than i can say.
thanks
[F8] Controling Movie Clips
hi,
i am new in flashkit , and hello to you all..
well i have a problem. i am trying to do photo gallery with categories and i ll make movie clips for each category . but i dont want them to appear till i call them in main stage. how can i control them ?
movie clips will look like this :
http://rapidshare.de/files/32812093/photo_gallery.rar
Controling Movie Clips
Hi
I'm in need of some help!
I have a string called my_string("tiger")
I use my_string.charAt() in a loop
and populate my_list["t","i","g","e","r"]
I attachMovie using my_list with movieclips of the same name
called t i g e r and they all appear on the stage so far so good.
problem bit...
in each clip on the first frame is a variable called my_num and I want to make each clip have a different value using another list my_nums[10,11,3,5,6] in a repeat loop but when i check with a trace my_num is undefined
I dont seem to be able to get the attached movies to do anything, I try to change x and y alpha etc but there is no response. its ok when im creating them, i can set x and y etc, but not afterwards, I have put them on the _root so there isnt any long paths to muck up.
anybody got any ideas
cheers
W_lingo
Controling All Movie Clips
is there a way to refer to all movie clips on the stage or apply a function to all movie clips without applying the function to all manually?
Controling All Movie Clips
is there a way to refer to all movie clips on the stage or apply a function to all movie clips without applying the function to all manually?
Controling Movie Clips From Buttons Within Them
greetings - 1st time posting here so please tell me if this question belowng in a different forum.
i have a movie clip consisting of 3 objects that scrolls across the screen. I am trying to make it so that when the user mouses over one of the objects in the movie clip, that clip stops playing and when they mouse out, it starts up again.
I am using the 'tell target' action for this but the button seems to be ignoring it. Is there some rule that prohibits objects embedded in a movie clip from controling that clip?
I am able to control the movie clip using another instance of that button outside of the movie clip and I am able to execute other actions (not controlling the movie clip) from that button when it is embedded in the movie clip.
Any help would be greatly appreciated.
-d
Controling Movie Clips With Buttons
Dear Anybody
Fron the main scene of my movie I’m trying to stop a movieclip running using a button
Currently I have a stop button with the command
on (release) {
stopAllSounds ();
stop ();
}
Which stops the sound and the main timeline but the movie clip carries on running..
I have stopped the movieclip by converting the stop button into a movieclip and using an instance of it with ‘on clip event as follows’
onClipEvent (mouseUp) {
_parent.stop();
}
onClipEvent (load) {
stop ();
}
onClipEvent (mouseUp) {
gotoAndStop (2);
}
Which is fine apart from I can’t then seem to create a rollover effect on the movieclip ‘button’
As a new scripter any help is very welcome!
Thanks
Mark Waterfield
Dam Another Issues Controling Movie Clips, HELP
I have a external .SWF file that plays within a movie clip called “Quote”
The movie clip “Quote” code on frame one looks like:
loadMovie("OpenQuote.swf", 3);
When the external.swf file finishes playing how do I move to the next frame in the movie clip “Quote”.
The external.swf file was created in Swish, but any code I seem to add with in Swish is not moving to the next frame. So I just want to know when the dam thing ends, then I will have code outside of Swish move to the next frame in the “Quote” movie clip.
Again thank you for all of your help as I learn Flash.
Murphie
Controling Movie Clips Timeline
I have a movie clip of a meter that movies when a song is being playing. I have a timeline in this movieclip with frame 1 showing movement, and frame 5 showing just a static image.
How do I interact with it from the main timeline? What I tried was meter_mc.gotoAndStop(5);
This didn't seem to do it though.
Controling Outside Movie Clips From Inside A Different One
hello, I wrote a message earlier and could not get my code to work. I am trying to control a movie clip named "mensroomMovie" that is on the main time line of scene 1 when a button is pushed inside of a movie clip named "womensroomMovie" it looks something like this:
this.stop();
function gotoFrame(event:MouseEvent):void
{
this.gotoAndStop(10);
this.parent.getChildByName("womensroomMovie").gotoAndStop(10);
};
enterButton.addEventListener(MouseEvent.CLICK,gotoFrame);
the second line inside the function does not work and the code works fine without that second line. Can anyone suggest anything. Thanks a lot
Edited: 05/31/2007 at 11:19:35 PM by robert113
Duplicated Movie Clips Help
Question 1.
How do I duplicate movie clips that aren't in the frame but in the library? I went to linkage and exported it for actionscripting (I told it to export in the first frame) but it doesn't recognize them.
Question 2.
I use a variable called movie_num to keep track of my duplicated movie clips. Everytime a movie clip is duplicated, I add 1 to movie_num. When I try to alter a variable in a movie clip (let's call the movie clip "circle"), I would say in action scripting:
("circle"+ movie_num).variable_name = 1;
That would alter the last movie clip to be duplicated but it doesn't work. When I use that method for dragging or removing a movie clip, it does work. What am I doing wrong? Also, give me a better way if you have one (provide action script please).
Problems Controling Movie Clips With Buttons
I have 5 separate buttons in my main movie, each controlling 5 separate movie clips. When clicked each button plays its corresponding movie clip.
Here's my problem...Can somebody tell me how to script the buttons so when a different button is clicked, the movie clip that is currently visible/active will play in reverse, back to it's starting point and play the new button's corresponding movie clip normally. Hope this makes sense. Thanks.
Controling Movie Clips Within DHTML Frames
I've posted question before but all i've got was a very complex answer, and though i'm new to all this, i need more simplifed solution....
What action should I use and how?
I have dhtml paga with 2 frames:
1."menu2) menu.swf
2."screen") screen.swf
how do I make screen.swf button in "screen" frame open 5th frame of the menu.swf in "menu" frame ?
Thank you
__________________
Buby
Controling Duplicate Nested Movie Clips
in my movie I have a movie clip that is nested about 4 layerys deep. this movie clips parent clip is duplicated dynamicly. I need to be able to control this clip. it works hard coded:
mcScroler.scrolerMCS.r1.c2.gotoAndPlay("on");
this will work fine but when I try to
so the way it works is movie clip rx gets duplicated based on mv and named as r1,r2,r3,etc... inside this clip are 13 clips named c1,c2,c3,etc... those are what I want to control
if I hard code it
mcScroler.scrolerMCS.r1.c2.gotoAndPlay("on");
it controls it. how ever as r1 and c1 are dynamicly genereated in the for loop bellow I have set rw and cl to be the generated names of the mc but it does nothing I have tried String(="r"+a), eval(="r"+a) tryed
mcScroler.scrolerMCS.r+a.c+j.gotoAndPlay("on");
totaly lost on how to make this work
hope this makes some sense
oh and tracing cl rw returns the corect name but it just does not target it when put in the mc stacking order
thanx
//amount of movies to be duplicated
mv=7
for (a=0; a<mv; a++) {
for (j=0; j<14; j++) {
var rw="r"+a
var cl="c"+j
trace("cl "+cl);
trace("rw "+rw);
mcScroler.scrolerMCS.rw.cl.gotoAndPlay("on");
}
}
Controling Movie Clips From Main Scene
ok, i could also control the clips with onClipEvent, but one of the clips i want to control is inside another clip that is on the main stage. I hope that makes sense.
hi,
I have a movie wherein I would like to control (gotoAndStop() actions) two clips from a frame action if possible. When the user clicks a button the main movie goes to another frame, I would like the movie clips to go to another frame as well.
hope that makes sense.
Thanks,
pjustice
Controling Other Movie Clips Or Loaded Movies
Hi, I don't really know how to search for this answer, but I know it must have already been asked.
How can I address a certain movie.clip or loaded movie from inside another movie clip? By assigning names to every movie I want to control?
The situation is: I have a movie with lots of movieclips (most of them fading in/out), then I load an external swf by clicking a button (this button fades out). Then in this newly loaded movie I have a button that let me go back (unloading the swf). But I also need to right a code so that the previouslly faded out button fades in again. The problem is that it is outside the external swf and worst... the fading sequence is inside a movie clip.
I know there are countless ways of doing what I'm doing without having to control a clip from inside another clip. But I wanted to learn how to do it (if it is possible at all!)
Talking To Duplicated Movie Clips?
I am having a problem communicating properly to MCs that are being duplicated when the user clicks an icon and drags them to a hotspot.
My question is, if I have an data array associated to the MC being duplicated, does or can the duplicated MC contain a unique instance of the data array set? and if so, if the dulicated MC is on _level0, can I send the mulitdimensional array to the server as one variable? Since, I'm going to have an array of duplicatedMCs that each contain a unique data array set.
Targeting Duplicated Movie Clips
Hope someone can help me. I'm trying to target individual MC's that are inside duplicated MC's generated by an array. Is this possible?
thanks for any help!
Ray Boehmer
E-Learning Developer
Cisco Systems, Inc.
HitTest For Two Duplicated Movie Clips?
i have this game where there are MC's being duplicated and positioned at random points...my question is how do i test if one duplicated MC hits another one? i cant just go if(this.hitTest(_root.something)) because i dont know what name exactly the _root.somethign will be...since it could be either _root.something1, _root.something2, etc...get what i am trying to say? thanks.
Controlling Duplicated Movie Clips
hi,
On the scene I want 2 insects.I scripted one insect movie,when you click it,it gets crushed.Then ý duplicate it but when ý click on the second movie clip ,still first one crushs.Can you tell me what to do to crush the second one?Sorry,this is the second message but I couldn't get any help from the first one.
Thanks
Targeting Duplicated Movie Clips
So I'm using the following actionscript to duplicate a movie clip 50 times:
i++;
duplicateMovieClip ("_root.flower", "flower"+i, i);
Is there a way to target these clips?
Basically what I'm doing is duplicating a movie clip of a flower-like object. Then, when it's been duplicated 50 times, I want to wipe the stage clean of all duplicated clips and start again. What can I do to remove all of these movie clips?
Masking Duplicated Movie Clips
I am duplicate a movie clip that is under a mask layer but the duplicates of the clip apear outside the mask. is there any way to specify what layer the duplicates belong to or to put them under the mask.
thanx dave
Masking Duplicated Movie Clips
I am duplicating a movie inside another movie that loads external images.
I want to mask over the images to show only portions for a menu.
I tried using two movies in the container movie, one for the images(works well) the other for mask(failure).
I need help Urgently Please....
Targeting Duplicated Movie Clips
anyone know how to do this....i've been trying really hard and failing.... pleeeeease help someone...i want to target a movie clip("grow") inside some of the duplicated movie clips and tell it to play...
on(keyPress"i"){
//variables
b = random(12);
i++;
a = "leaf" + i
//dupposition
_root.leaf.duplicateMovieClip(a,i);
_root.leaf._y = ypos[b]
_root.leaf._x = xpos[b];
}
on(keyPress"i"){
_root.leaf1.grow.gotoAndPlay("fall");
}
Removing Duplicated Movie Clips
Please help me!
I've got a movie clip that is duplicated that I'd like to remove/ or make invisible through a button action. I can remove the original clip, but not the duplicates of it. Can anyone help me?
Thanking you kindly!
Removing Duplicated Movie Clips
Does anyone know how to remove mulitple movie clips at one time (like when a user clicks a button)?
I need to clear an area of duplicated movie clips, all with different instance names at different levels.
Since they are on consecutive levels, I was going to run a loop to remove them based on their level position, but I don't know how to target a movie clip based on its level.
Thanks!!!
Removing Duplicated Movie Clips
I have a movie clip that can be dragged and when released a duplicate movie clips clip is created. This is the script that I used:
on (press) {
startDrag(_this);
}
on (release) {
stopDrag();
_root.i++;
_root.draw.green_circle.duplicateMovieClip("green_ circle"+_root.i, _root.i);
}
Now I would like to create a button that removes all of the duplicate movies clips. I have tried this with no success:
on(release){
for (var j = 1; j<_root.i; j++) {
_root.draw["green_circle"+j].removeMovieClip();
}_root.i=0;
}
Any suggestions?
Dragging Duplicated Movie Clips
i have movie clips that i'm using as stamps in a drawing program. when you click once on the stamp it picks it up then when you click again it places the stamp on the board. there are some problems with it though that I dont know how to fix. the problems are...
the biggest problem... when you click on a different stamp, one of the previous stamps disappears. so if you put two pig stamp on the board, and then put a chicken stamp on the baord, one pig will disappear. i dont want to have a stamp limit, they should be able to fill the whole board with stamps if they choose.
once the stamp is placed on the board you can click on it again and duplicate and drag the already duplicated MC. i dont want it to do this. i only want them to have one chance to place it on the board.
heres the code im using:
on (press) {
this = this.duplicateMovieClip("pig2"+count, count);
count += 1;
startDrag (this);
}
on (release) {
stopDrag ();
}
i changed the name of the duplicate mc for each stamp, for example the chicken is named "chicken2".
any help would be appreciated, thanks.
Masking Duplicated Movie Clips (HELP)
I have an array of thumbnails that I create through duplicated movie clips and loading jpegs into the clips. I have more jpegs than I do space in the strip I am using to display them however and I wanted to create a mask for each of the thumbnails so they would only be visible in the center of the strip.
duplicateMovieClip(_parent.thumbStrip.ImageButtons , "ImageButtons"+i, i);
duplicateMovieClip(_parent.thumbStrip.mask, "mask"+i, (i+totalImages));
_parent.thumbStrip["ImageButtons"+i].loadMovie("Thumbs/"+ _parent.slideImage[i]);
_parent.thumbStrip["ImageButtons"+i].setMask(_parent.thumbStrip["mask" + i]);
When I run this, the movieclips are simply duplicated above the thumbnails and do not act as masking layers. I don't want the masks to be visible, I just want them to act as a window. I've searched the forums and the links I have found don't quite relate to this approach that I can tell.
Any suggestions as to what I am doing wrong, and is this question clear?
Targeting Duplicated Movie Clips
I'm duplicating a movie clip using the following code:
i = 1;
do{
my_mc.duplicateMovieClip("my_mc" +i,i);
i++;
}while (i < 50);
The next thing I want to do is line them all up side by side, so what's the best way to target all the duplicated movie clips so I can re-set their _x and _y coordinates?
Sorry if there are loads of posts on this already but my browser kept timeing out every time I tried to search.
Many thanks.
Duplicating Duplicated Movie Clips
yo...
i found this tutorial here in fk that teaches how to make a flame animation.
the flame animation duplicates a movieclip.
what i want to happen is make the flames rain down,
i'm lost for words right now... sorry if im unclear...
anyways i'll attach the .fla here.
thanks.
Problem With Duplicated Movie Clips
Hey guys,
i'm having a strange problem with a slide show i'm trying to make. Essentially, it will be a scrolling slide show that automatically centers every time you click on an object. that part works right now. However, I want the slideshow to "wrap around" - that is, if i reach photo 100, i want photo 1 to be shown next to it, and vice versa.
Currently, I have it as far as duplicating the movie clip and positioning itself correctly - however, the onEvent handlers do not work for the duplicated movie clips.
I'd like to think i know a decent amount about actionscript but I must admit this is kind of uncharted waters for me. If anyone could help me get flash to recognize the on(release) event on the duplicated clip, I'd be forever grateful!
How Do I Mask Duplicated Movie Clips?
I am making a paintball game and have created a paintball movie clip that grows to simulate it hitting the screen. The problem i am having is that when i duplicate it, all my masking stops working. Is there a way of duplicating it behind the mask?
This the code i am using for duplicating at the paintball
_root.shot.duplicateMovieClip("shotx"+count, count);
_root["shotx"+count]._x = _root.enemy._x;
_root["shotx"+count]._y = _root.enemy._y;
_root["shotx"+count]._xscale = 0;
_root["shotx"+count]._yscale = 0;
count += 1;
Moving Duplicated Movie-Clips
If I have a line and duplicate it and make the new name "line"+i. How do I make the _x of every "line"+i to be added by 5. It doesn't work for me or I don't know the trick, I use Flash MX if that makes a difference or not. I'll post the code of what I mean.
Code:
_root.onEnterFrame = function() {
for (i=1; i <= 25; i++) {
duplicateMovieClip(line, "line"+i, i);
}
_root["line"+i]._x += 5; // this is what I want to work but I don't know how
};
Masking Duplicated Movie Clips
hi,
i'm using duplicateMovieClip() to display a list of results and i'm trying to mask an area of those results.
the problem i'm having is that the mask doesn't work because the duplicated movie clips are created at a higher depth than the mask itself.
anyone have any ideas how to fix that?
thanks in advance,
alex =]
Removing All Duplicated Movie Clips
I have a whole bunch of different duplicated movie clips called "unit+_root.i". (like unit0, unit1, unit2... etc) and when they defeat this castle thing, it moves to the next frame. The thing i want is when it goes to the next frame, it will take off all of those duplicated movie clips i just made. can anyone help me?
How Do I Target These Duplicated Movie Clips?
i want to when i click a button delete all these 50 smoke movie clips from the movie... how?
unloadMovie(_root.smoke_mc+j")????
_root.smoke_int = setInterval(createSmoke, 50);
function createSmoke() {
for (j=0; j<50; j++) {
var newSmoke = attachMovie("smoke", "smoke_mc", 500+j, {_x:400, _y:400});
newSmoke._x = (random(5)+70);
newSmoke._y = (random(100)+185);
newSmoke._xscale = (random(20)+50);
newSmoke._yscale = (random(120)+50);
newSmoke._alpha = random(5);
newSmoke.gotoAndPlay(random(20)+1);
}
}
Loading Jpg In Duplicated Movie Clips?
hello there.
I am trying to make an easy upgradable thumbnail flash. the concept is, duplicate a movie clip x times in order to load x .jpg files in the duplicated movie clips.
my code is:
x=1;
mc.duplicateMovieClip ("mc"+x, x++ );
problem is that I cannot address the newmovie clips to be loaded specific jpg files.
meaning, when I use:
newclip="mc"+x;
trace(newclip);
..I get the filename that corresponds to the loaded jpg I want, eg, jpg filenames be mc1.jpg, mc2.jpg, mc3.jpg, etc.
but I can't use this using loadmovie, eg
newclip.loadmovie("mc"+x+".jpg");
How do I syntax the loadmovie function in order to get the results I want?
Duplicated Movie Clips And Hittesting
I'm attempting a tower Defence game.
I've used both the available tutorials, then built from there.
I'm up to finding a way in which you can not place a tower on another tower.
i know it can be done.
heres the code.
Code:
function new_tower() {
tower.duplicateMovieClip("tower_"+t, t);
_root["tower_"+t].delay = 1;
_root["tower_"+t].dmg = 33;
_root["tower_"+t].bulletspeed = 5;
_root["tower_"+t].timer = 0;
_root["tower_"+t].range_visible = false;
_root["tower_"+t].tower_range._visible = false;
_root["tower_"+t].placed = false;
_root["tower_"+t].radius = 18.5;
_root["tower_"+t].onMouseDown = function() {
if (!this.ctower.hitTest(_root.path1.g1)) {if (!this.ctower.hitTest(_root.path1.g2)){if (!this.ctower.hitTest(_root.path1.g3)){if (!this.ctower.hitTest(_root.path1.g5)){
with (this) {
placed = true;
}}}}}
};
Just the top third of the tower actionscript.
Anyway, the t value is ++'ed at the end.
I've been toying around.. but to no avail.
But yeah, how would i do it. I tried a few stupid attempts like if(!this(_root["tower_"+Infinity]))
ect.
Please help us out, thanks.
Controlling Duplicated Movie Clips?
Okay, I was here just the other night discussing this (and you guys were alot of help!) and i just have some questions
I have this game I'm making, its kinda like the game Defend Your Castle (if you've ever played it)
Basically I have one movieclip of a stickman, and i have that stickman being duplicated using duplicateMovieClip. All these duplicated stickmen spawn on the left side of the screen, and start running to the right.
Here is the code on the frame:
------------------------------------
interval=setInterval(SpawnStick ,1000);
count=1;
depth=1200;
function SpawnStick(){
status=Math.round(Math.random()*2);
if (status==0){
name="stick"+count;
duplicateMovieClip("stick", name,depth++);
setProperty(name,_x,-31.7);
count++;
}
}
------------------------------------
//basically just a setinterval to call the function SpawnStick (to spawn new stickmen)
I just want the stickman to turn red when you shoot/click him once. The red version of the stickman starts on frame 7 of the movieclip
on the "stick" movie clip i have:
------------------------------------
onClipEvent(load){
shot = 0
this._y=random(175)+140;
}
onClipEvent(enterFrame){
this._x += 2;
}
onClipEvent(mouseUp){
shot++;
if (shot==1){
this.gotoAndPlay(7);
}
}
------------------------------------
The only problem is that when i click/shoot any of the stickmen, ALL of the stickmen that are on the stage turn red. I understand WHY this happens (all the duplicated movie clips have the same code on them) but I don't know how to fix it.
How can i individually control each duplicated movie clip? I just need them to turn red when i click/shoot them once.
If anyone could help, i would be eternally grateful
Removing Duplicated Movie Clips
HI There
I know this has been discussed before, but I was unable to resolve the following problem using the proposed answer. I am working on a Flash / ASP application for logging IT related requests. In order to display all requests logged by the current logged in user, I query the database, and return the results as arrays. Using the arrays, I create a set of duplicated movieclips using the following code:
ActionScript Code:
stop();
// hide the origional clips
RefID._visible = 0;
Subject._visible = 0;
DateLogged._visible = 0;
// split up the array by looking for the commas
ID_array = IDoutput.split(",");
Subject_array = SUBoutput.split(",");
DateLogged_array = LOGoutput.split(",");
// get the length of the array
ID_length = ID_array.length;
// set the start y position (x position depends on where you put it on the screen)
yposition = 70;
// looping everything
for (i=0; i<ID_length; i++) {
// RefID
duplicateMovieClip(RefID, "RefID" add i, depth);
setProperty("RefID" add i, _y, yposition);
RefID.RefID = ID_array[1];
set("RefID" add i add ".info", ID_array[i]);
depth--;
// Subject
duplicateMovieClip(Subject, "Subject" add i, depth);
setProperty("Subject" add i, _y, yposition);
Subject.Subject = Subject_array[1];
set("Subject" add i add ".info", Subject_array[i]);
depth--;
//Date_Logged
duplicateMovieClip(DateLogged, "DateLogged" add i, depth);
setProperty("DateLogged" add i, _y, yposition);
DateLogged.DateLogged = DateLogged_array[1];
set("DateLogged" add i add ".info", DateLogged_array[i]);
depth--;
// Set the y position plus 25
yposition = yposition+25;
}
The code above works fine. When the user clicks on the "RefID" movie clip, it must take him/her to the details of that issue. This once again works fine, but when I try to remove the movieclip, it only removes the first one, and the rest remains visible.
I tired the following code to remove the duplicated clips:
ActionScript Code:
stop();
for (i=0; i<ID_length; i++) {
test = "RefID" add i;
removeMovieClip(test);
}
Thank you in advance
O-Grrrrr
Formatting Duplicated Movie Clips
Hi All,
I am using the following code to duplicate a movieclip (itemInstance) and get them to stack one below the other.
Code:
// get position of template movie clip
yPos = getProperty("itemInstance", _y);
// iterate over array elements
for (i=0; i<(names.length-1); i++) {
// clone movie clip and name it
duplicateMovieClip("itemInstance", "itemInstance"+i, i);
// set position
setProperty("itemInstance"+i, _y, yPos+i*108);
}
This works fine, but I want it to stack 10 vertically and then go right 300px (or so) and then go back to the top and stack another 10. And so on, like bricks in a wall.
Just so you know the number for 'i' is dictated by the number of names in a database.
Any help will be greatly appreciated - thanks
|