Question
Preloading in the swf itself AS3
Hello guys ;]
I need some help in AS3.
My problem is that I can't preload the content in the swf movie itself.. I mean movie clips and images that are inside the swf not external and so on.
In AS2 All I needed to do is this :
this.onEnterFrame = function() {
loadingAmount = this.getBytesLoaded()/this.getBytesTotal()*60;
if (loadingAmount == 60 and sVars.loaded == true and this.bigPicWidthsScript_mc.wVars.loaded == true) {
this.gotoAndStop(3);
delete this.onEnterFrame;
}
};
This is juat an example what used to work.. I copied this part from a code I wrote time ago in AS2.
So all u had to do is put this code on frame 1 along with some preloading graphics (small size), move all your movie clips u want loaded before they actually show up and start your animation to frame 2 as keyframe, and Put the ones who show up at the start in your movie at frame 3 where you actually go when preloading is finished.
So I want to do the same thing in AS3.. I've found tutorials about preloading swfs images and so on but I don't need that.. I need this one here.. so does anyone have any idea how to do that ?
I will be very grateful !
Waiting for replies,
Filip Nedyalkov
Also u had to set Export frame for classes = 2 (in the publish settings),
I need some help in AS3.
My problem is that I can't preload the content in the swf movie itself.. I mean movie clips and images that are inside the swf not external and so on.
In AS2 All I needed to do is this :
this.onEnterFrame = function() {
loadingAmount = this.getBytesLoaded()/this.getBytesTotal()*60;
if (loadingAmount == 60 and sVars.loaded == true and this.bigPicWidthsScript_mc.wVars.loaded == true) {
this.gotoAndStop(3);
delete this.onEnterFrame;
}
};
This is juat an example what used to work.. I copied this part from a code I wrote time ago in AS2.
So all u had to do is put this code on frame 1 along with some preloading graphics (small size), move all your movie clips u want loaded before they actually show up and start your animation to frame 2 as keyframe, and Put the ones who show up at the start in your movie at frame 3 where you actually go when preloading is finished.
So I want to do the same thing in AS3.. I've found tutorials about preloading swfs images and so on but I don't need that.. I need this one here.. so does anyone have any idea how to do that ?
I will be very grateful !
Waiting for replies,
Filip Nedyalkov
Also u had to set Export frame for classes = 2 (in the publish settings),
