actionscript 3 - AS3 Loader Class best practice -
In a recent project I had configured a custom loader class, first I would like to load my loader into a personal microphone I define
private var _myLdr: loader // then in the constructor _myLdr = new loader (); _myLdr.contentLoaderInfo.addEventListener (event.complete, imported); _myLdrContentLoaderInfo.addEventListener (Progressive, Load Progress); _myLdr.contentLoaderInfo.addEventListener (IOErrorEvent.IO_ERROR, ioError);
And then in the end when I need to load a new property, I call my loader example through a public method.
_myLdr.load (new URLRequest ('myswftoload .swf'));
So far it is so good .... You do not have to see your page using the debug version of FlashPlayer 9.024, in which case you
Receive the ArgumentError: # 2025 Error: The supplied DisplayObject must be a child of the collar. Flash.display :: loader / _load ()
WTF ??? !!
To correct, I have to install a new loader new property.
Can anyone tell me which method will be considered as 'best practice'?
An loader
example may occur at one time. With the same loader example later, load ()
before issuing the request _myLdr.unload (); Call
.
It is being said that, I will make a new loader
example for each load (and make sure that the previous examples are loading properly when they no longer require is not).
Comments
Post a Comment