Link to home
Start Free TrialLog in
Avatar of eddiewu80
eddiewu80

asked on

Having trouble unloading an external SWF in AS3

I am able to load an external swf just fine by using the code shown below. Once the external swf has completed playing (it's like a 10 second clip) I would like to unload it automatically. Any help would be greatly appreciated. I'm a flash noob so please be very clear, thank you so much.


var myLoader:Loader = new Loader()
addChild(myLoader);
var url:URLRequest = new URLRequest("clippromo.swf"); 
myLoader.load(url);

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of IqAndreas
IqAndreas
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You might also want to look into the "unloadAndStop" function which stops sounds automatically does a lot of the work for you:
http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Loader.html#unloadAndStop%28%29