View Full Version : preloader problem
chemicalPie
June 28th, 2003, 12:58 AM
this is the code I am using, but after the preloader runs and loads the movie to 10% of its size, it does not move on the the scene "player"
onClipEvent(enterFrame){
loaded = _root.getBytesLoaded();
total = _root.getBytesTotal();
framesLoaded = Math.ceil((loaded/total)*100);
gotoAndStop(framesLoaded);
if(framesLoaded >= 10){
_root.gotoAndStop("player", 1);
}
}
radicaljugnu
June 28th, 2003, 11:18 AM
try adding the code in the frame actions of frame 1 and adding a gotoAndPlay(1) action in a keyframe at frame 2
chemicalPie
June 28th, 2003, 11:24 AM
so keep things the way they are but just take the gotoAndPlay action and put it on frame 2 like this:
frame one:
onClipEvent(enterFrame){
loaded = _root.getBytesLoaded();
total = _root.getBytesTotal();
framesLoaded = Math.ceil((loaded/total)*100);
gotoAndStop(framesLoaded);
if(framesLoaded >= 10){
play();
}
}
frame two:
gotoAndPlay("player", 1);
radicaljugnu
June 28th, 2003, 11:31 AM
no no. just put this code in frame 1-
ifFrameLoaded("player",1){gotoAndPlay("Player",1)
loaded =getBytesLoaded
and so on.
in second frame just add-
gotoAndPlay(1)
that is ALL. No onCLipEvent handlers for frame actions
chemicalPie
June 28th, 2003, 11:35 AM
the problem with that is I don't want to load the whole movie nefore it will play it has embedded mp3s in it the have graphics that are synced, so I only want to load 10% of the movie then play so the inerface will be visable aswell as the first mp3.
so that is why I was using the math function to calculate 10%
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.