-
Senior Member
duplicateMovieClip()
I need help with the duplicate movie clip function. I want to make an image gallery that loads the images dynamically from a php script and database. I can get the images to load if I have each seperately named movie clip instances placed on the stage. I don't know how to do it using the duplicateMovieClip function. Below is the code I am using currently.
Code:
imgCount = Images.imgCount;
for(i=0; i < imgCount; i++){
loadMovie(Images["fileName_"+i], _root["thumbnail_"+i]);
}
stop();
With the above code I four movieclip instances named thumbnail_1, thumbnail_2 etc..
I want to have the first movie clip to be duplicated be positioned at (75,75) and then the next one be placed at (200,75) and so in increments of 125 pixels in _x.
Can anyone help?
Thanks
-
Senior Member
code:--------------------------------------------------------------------------------
imgCount = Images.imgCount;
for(i=0; i < imgCount; i++){
duplicateMovieClip("thumbnail_", "thumbnail_" add i, i);
loadMovie(Images["fileName_"+i], _root["thumbnail_"+i]);
_root["thumbnail_"+i]._x=(thumbnail._x+_root["thumbnail_"+i]._width)*i;
}
stop();
--------------------------------------------------------------------------------
It can be like this!!
dipkya
---------------------------------------------------------------
SO MUCH HAVE TO DO, SO LITTLE HAS DONE!
-
Senior Member
Thanks dipkya, that does what I want. But now how would I do it if I only wanted to have 4 thumbnails in a row and then start a new row. I tried it but I couldn't get it.
I really appreciate your help.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|