# createEmptyMovieClip

**URL:** https://forum.kirupa.com/t/createemptymovieclip/325382
**Category:** Uncategorized
**Created:** [October 12, 2011, 2:35pm UTC](https://forum.kirupa.com/t/createemptymovieclip/325382 "2011-10-12T14:35:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![fruitbeard](https://avatars.discourse-cdn.com/v4/letter/f/e8c25b/32.png) [@fruitbeard](https://forum.kirupa.com/u/fruitbeard)
#### Post date: [October 12, 2011, 2:35pm UTC](https://forum.kirupa.com/t/createemptymovieclip/325382/1 "2011-10-12T14:35:23Z")

</div>

Hi there,

I find myself having problems with createEmptyMovieClip(s), I only seem to have one loading, I basically wish to have a preload for each thumbnail, my images are obtained from a php array and not an xml file.

Any help please.

Code-

hspace = 80;  
vspace = 20;

function thumbs() {[INDENT]for(q=0; q\<TotalImages; q++){[/INDENT]  
[INDENT]myMovieClip.createEmptyMovieClip(“imageHolder”+q, q);[/INDENT]  
[INDENT]myMovieClip.imageHolder.loadMovie(ImageList\*);[/INDENT]  
[INDENT]//loadMovie(ImageList\*,myMovieClip.imageHolder);  
[/INDENT]  
[INDENT]myMovieClip.onEnterFrame = function() {  
[/INDENT]  
infoLoaded = myMovieClip.imageHolder.getBytesLoaded();  
infoTotal = myMovieClip.imageHolder.getBytesTotal();  
percentage = int(infoLoaded/infoTotal\*100);  
myMovieClip.Bar.gotoAndPlay(percentage);  
if (percentage==100) {[INDENT=2]new mx.transitions.Tween(myMovieClip.imageHolder, “\_alpha”, mx.transitions.easing.Strong.easeInOut, 0, 100, 1.5, true);[/INDENT]  
[INDENT] myMovieClip.imageHolder.\_x = (q%5) \* hspace;// splits in rows of 5[/INDENT]  
[INDENT] myMovieClip.imageHolder.\_y = Math.floor(q/5) \* vspace;// columns[/INDENT]  
[INDENT] percentage = “0”;[/INDENT]  
[INDENT] myMovieClip.imageHolder.onRelease = function() {  
[/INDENT]  
//do things i want[INDENT] }[/INDENT]  
[INDENT] delete myMovieClip.onEnterFrame;  
[/INDENT]  
}  
}  
}  
}

// function called at end of time line using thumbs();

any help much apreciated, thank you

site : [http://www.fgps.com/keith](http://www.fgps.com/keith)

although the non working thumbnails is not there, other things are.

Thanks

Fruitbeard
