Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 05-17-2012, 03:19 AM   #1
bigbox
Registered User
 
Join Date: Aug 2007
Posts: 17
Default How can I unload this on frame

I been trying to find a way to unload an external movie on enter a frame without having to click at anything?

Code:
var swfLoader1:Loader = new Loader();
mainevent.addChild(swfLoader1);
var bgURL1:URLRequest = new URLRequest("mainevent.swf");
swfLoader1.contentLoaderInfo.addEventListener(Event.COMPLETE, loadProdComplete1);
swfLoader1.load(bgURL1);
function loadProdComplete1(e:Event):void {
	trace("file loaded");
}
bigbox is offline   Reply With Quote
Old 05-17-2012, 10:41 AM   #2
Poony
Senior Member
 
Poony's Avatar
 
Join Date: Aug 2011
Location: Sweden
Posts: 387
Default

Firstly, i don't think you mean "unload", do you? Oh well, just gonna assume you mean "load"..

You do get the trace "file loaded", don't you?
But you're not seeing the content on screen? Is that your problem?

Use:
ActionScript Code:
var swfLoader1:Loader = new Loader(); var bgURL1:URLRequest = new URLRequest("mainevent.swf"); swfLoader1.contentLoaderInfo.addEventListener(Event.COMPLETE, loadProdComplete1); swfLoader1.load(bgURL1); function loadProdComplete1(e:Event):void {     trace("file loaded");     mainevent.addChild(e.currentTarget.content); }
Poony is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:15 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.