puppycount = new LoadVars();
puppycount.load(“puppycount.txt”);
puppycount.onLoad=function(){
count=this.count;
count=parseInt(count);
for (i=1; i<=count; i++) {
_root.createEmptyMovieClip(“puppyholder”+i, i);
_root[“puppyholder”+i]._x=i*100;
_root[“puppyholder”+i]._y=100;
loadMovie(“puppy”+i+".jpg",_root[“puppyholder”+i]);
}
}
it works, but when I click on another button in my movie each movieClip that this script created remains above everything else??
Something to do with the levels. I don not under stand this. How can this be fixed. Please be very specific this is confusing to me.
When the user clicks the “puppies” button the movie goes to and plays 11 frames starting at frame 84 of the main timeline. In these frames is a movieClip called “puppies” and in “puppies” is a movieClip called “slider”. The script…
puppycount = new LoadVars();
puppycount.load(“puppycount.txt”);
puppycount.onLoad=function(){
count=this.count;
count=parseInt(count);
for (i=1; i<=count; i++) {
_root.createEmptyMovieClip(“puppyholder”+i, i);
_root[“puppyholder”+i]._x=i*100;
_root[“puppyholder”+i]._y=100;
loadMovie(“puppy”+i+".jpg",_root[“puppyholder”+i]);
}
}
…is in frame 1 of “slider”. I guess my question is what does _root do exactly. When I put:
this.createEmptyMovieClip(“puppyholder”+i, i);
instead of:
_root.createEmptyMovieClip(“puppyholder”+i, i);
the created movieClips are not visible when I click on the other buttons but the loop does not work it only loads the last picture.
However with _root, once I click on the “puppies” button the created movieClips are always there even after I click on other buttons.
Seems like I am not creating emptyMovieClips in the movieClip “slider” but rather on the main stage, is that the case? If so how do I fix it?
Another solution could be to create a clip in the _root that will hold all the clips that you create. That way, when you need it, you create it, and when you don’t need it anymore, you just destroy it.
Nice…your second suggestion worked thank you. I hate to bother you but you seem to give me the most help.
I’ve attached the .fla. and I will also attach the puppycount.txt and the jpgs in other posts
There are a couple of things I was wondering:
do you know how to make the puppy movieClips fade in with the rest of the blue rectangle when the user clicks on “puppies”?..test movie to see what I mean.
do you know how I can resize these puppy pics in the loop, so they will all be the same size?
If I click on the “puppies” button it shows the created movieclips, but if I click on it again they go away, can this be fixed?
I’m sorry, policy of the house. But if someone else wants to check your fla…
From what I understood, you want to load the pictures and have them fade in, right? Well, supra wrote the code for it in the gallery tutorial. check it, everything’s there.