PDA

View Full Version : preloader that corresponds to movie clip


Matokist
06-15-2006, 03:02 PM
right, ive spent several days trying to work this out and now I have to accept that im going to have to start another preloader thread and be hated.

I want to make a preloader that corresponds to a movie clip.

the movie clip is 100frames long and is my logo filling up with colour from the bottom up. each increment in colour = 1 frame = 1 percent loaded. its called 'preloader'

so i go back to scene 1. ive got 2 layers

actions
movieclip

what do I do now, everytime ive progressed from this point ive gone wrong.

thankyou to anyone who can lend me their help.

Matokist
06-16-2006, 11:43 AM
ok, so ive been trying out code but it still wont work.

ive got my two layers actions and preloader.

in frame1 of action layer I ahve this:

total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100);
bar.gotoAndStop(percent_done);
if (percent_done>99) {
gotoAndPlay("Scene 2", "1");
}

and in frame2 I have:

gotoAndPlay(1);

my movie clip is called bar and has 100frames with a stop at the start.

but still no joy. any advice?