Copy link to clipboard
Copied
at this point I'm not sure if i have to individualy add cacheasbitmap/cacheasbitmapmatrix to true to each display object that needs it and load them seperatly
or if i can load the movieclip that they are in first and specify their properties later then add it to the stage when it is all loaded.
can anyone tell me the best way to do this or maybe some tutorials to check out?
the AS for the loading is
var PLoading:Bitmap = new Bitmap (new PlaneLoading());
addChild(PLoading); //loading screen
var PLevel:PlaneLevel = new PlaneLevel();
this.addEventListener(Event.ENTER_FRAME, loading); //reoccuring event listener happens as often as is set by FPS
function loading(e:Event):void //
{
var total:Number = this.stage.loaderInfo.bytesTotal;
var loaded:Number = this.stage.loaderInfo.bytesLoaded;
var percent:Number = loaded/total * 100;
trace (percent);
if (total == loaded) //checks if all bytes for all movieclips have been loaded
{
this.removeEventListener(Event.ENTER_FRAME, loading);
onComplete();
}
}
function onComplete ():void //removes loading picture, and loads level movieclip
{
removeChild(PLoading);
addChild(PLevel);
PLevel.x = 475.15;
PLevel.y = 315.35;
}
Copy link to clipboard
Copied
look this:
http://help.adobe.com/en_US/as3/mobile/WS4bebcd66a74275c36c11f3d612431904db9-7ffc.html
Copy link to clipboard
Copied
is there any way to do it to items inside graphic symbols? since they are light weight?
if i have a few movieclips with animated graphic symbols inside them how do i reference them to cache them if i cant make classes or as linkages for the graphic symbols
the way i would do it with movieclips is to
objectanimationmovieclip.seperateobjects.vectorobject.cacheAsBitmap = true
but if i have no class names for graphic symbols is there no way to refrence them?