newsteve
07-09-2009, 05:38 PM
preloader is not showing up until everything is loaded...
using AS3 in CS4. the strange thing is that the code is copied verbatim from a working preloader I used in CS3... also AS3... so I have no idea why its not working here... there can't be differences between CS3 and CS4 that are affecting it...???
I've tried various things, even hiding all of the content on the first frame with the preloader... but no luck! What could be the problem?
Help!
Code:
stop();
addEventListener(Event.ENTER_FRAME, myloading);
function myloading(event:Event) {
var bytestotal:Number = stage.loaderInfo.bytesTotal;
var bytesloaded:Number = stage.loaderInfo.bytesLoaded;
if (bytesloaded >= bytestotal) {
gotoAndPlay(2);
removeEventListener(Event.ENTER_FRAME, myloading);
}
}
using AS3 in CS4. the strange thing is that the code is copied verbatim from a working preloader I used in CS3... also AS3... so I have no idea why its not working here... there can't be differences between CS3 and CS4 that are affecting it...???
I've tried various things, even hiding all of the content on the first frame with the preloader... but no luck! What could be the problem?
Help!
Code:
stop();
addEventListener(Event.ENTER_FRAME, myloading);
function myloading(event:Event) {
var bytestotal:Number = stage.loaderInfo.bytesTotal;
var bytesloaded:Number = stage.loaderInfo.bytesLoaded;
if (bytesloaded >= bytestotal) {
gotoAndPlay(2);
removeEventListener(Event.ENTER_FRAME, myloading);
}
}