Adobe Dreamweaver Forums



Last 10 THreads :         Code that can effect two movie clips (Last Post : NedWebs - Replies : 1 - Views : 2 )           »          pop up blocker jacking my login (Last Post : reelhero - Replies : 6 - Views : 7 )           »          RoboHelp 7 Skins (Last Post : HelpDev - Replies : 7 - Views : 35 )           »          Clock .getUTC not working (Last Post : kglad - Replies : 3 - Views : 4 )           »          problems linking PDFs (Last Post : Alan - Replies : 1 - Views : 2 )           »          Changing RadioButton Label (Last Post : justintoflex - Replies : 2 - Views : 5 )           »          Table Borders MIssing in JavaHelp (Last Post : soxmann - Replies : 3 - Views : 8 )           »          cfimage error (Last Post : masoud_amen - Replies : 2 - Views : 3 )           »          Dragging components (Last Post : hsfrey - Replies : 2 - Views : 5 )           »          Is file too large? (Last Post : tweaked_eye - Replies : 0 - Views : 1 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-20-2008, 08:53 PM
NL-X
 
Posts: n/a
Diggs:
Default Re: Unloading SWFLoader... BUG??!

loader.load(null) makes my browser crash.
(running firefox2 on intel mac with flash 9.0.124)

I wonder whether this is a bug from Flash, or a bug from YouTube.

The Flex sdk clearly states that you need to be sure the loaded SWF needs to
close all its connections and stuff before it is unloaded. The unload even
dispatches an Unload event in the loaded SWF. The SDK advises coders to listen
to the unload event, and shut down all connections and stuff, so it wont still
exist after unload. (The connections and stuff cause still existing references
to keep the loaded SWF alive.)

It still annoys me a lot. I need to implement this in a big application, but I
can't accept that youtube movies stay in the memory (and sometimes even playing
out loud) after they are unloaded.




Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-23-2008, 12:44 PM
LuigiL
 
Posts: n/a
Diggs:
Default Re: Unloading SWFLoader... BUG??!

The problem you are experiencing relates to loading AS2 movies. BEFORE you
unload, you must close the netstream inside the loaded AS2 movie using a
function in the AS2 movie and you need to call that method using a
LocalConnection like this one:
http://www.gskinner.com/blog/archive...dge_easie.html
So, cleaning up can't be done from the AS3 movie that loads the AS2 movie,
cleaning up must be done by the AS2 movie itself.
Detail: if a AS2 movie can be loaded a second time during the same session,
you need to cache the loaded AS2 movie (essentialy remove it from the display
list and add it again when you need it) and save that local connection and
retrieve it to be able to close the stream again successfully. Otherwise it
will only work once.

More specifically on YouTube: these are also AS2 movies and you need to
load/show/control them using the following lib:
http://code.google.com/apis/youtube/...hromeless.html
Works like a charm.

Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 12:06 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk