I have 3 layers in my fla document and I'm trying to build a preloader.
The bottom layer is a vector company logo and it is masked by a rectangle with the same size.
The topmost layer contains the outline of the logo.
So basically I'm trying to animate the filling of the logo while the content loads.
My AS3 code is :
stop();
rectMask_mc.height = 1;
this.loaderInfo.addEventListener (ProgressEvent.PROGRESS, LOADING);
function LOADING(event:ProgressEvent):void {
var pcent:Number=event.bytesLoaded/event.bytesTotal*100;
rectMask_mc.scaleY = pcent;
if(pcent==100){
gotoAndStop("GameLogo");
}
}
When I stimulate Download I get a blank white screen and in the last moments the outline is shown and right after that the content displays.
What is the problem here ?
1. remove all on-stage assets from frame 1 except those needed by your preloader.
2. for all objects (classes and fonts) exported for use by actionscript, untick export in frame 1.
3. in your publish settings (file/publish settings/flash/actionscript 3.0 settings), change the export frame from 1 to 2.
that's usually good enough. if it's not, you'll need to check textfields created in the ide and disable font embedding in the ide. you can re-enable it using actionscript and suggestion 2.
In frame 1 after a slight change I have only the background and Preloader stuff.
I am getting only 100kB right now.
I didn't find step 2 useful for objects since from step 3 all of that is done.
The 2 fonts I'm using aren't exported for AS.
How can I disable font embedding in IDE and reenable it ?
Sorry, but I'm quite new to AS3 and Flash.
I'm testing it again and I see that the logo is completely visible all the time...See below my work enviroment :
http://i52.tinypic.com/2mg4cwy.png
Above shown is the "outline".
North America
Europe, Middle East and Africa
Asia Pacific