|
-
Jul 3rd, 2009, 09:40 PM
#1
[RESOLVED] Flash Action Script 3 - Unload swfs
Hi,
I have written this code to unload the swf that is the splash page for my flash site:
function homeHandler(event:MouseEvent) {
txtwelcome.visible = false;
var swfURLReq:URLRequest = new URLRequest(homeURL);
holder.load(swfURLReq);
btnEnter.visible = false;
}
As you can see I have just hidden the objects on the stage from the user so they don't appear on the new page.
Also, on the home page since the pages are being stored in a loader object I have used the following method:
function homeHandler(event:MouseEvent) {
holder.unload()
var swfURLReq:URLRequest = new URLRequest(homeURL);
holder.load(swfURLReq);
}
Is it acceptable to use the one urlrequest and just assign new values to it or should I create a new urlrequest each time and use case statement to determine which urlrequest was triggered and just select that particular object to close?
Thanks,
Nightwalker
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jul 9th, 2009, 01:23 AM
#2
Re: Flash Action Script 3 - Unload swfs
I found the answer I was looking for:
http://forums.adobe.com/thread/457854
it's better to use a different loader for each object loaded. and when a loaded object is no longer needed the loader should be readied for gc (and gc' if you're publishing for fp 10).
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|