![]() |
![]() |
||||||
|
|||||||
| Tags: |
![]() |
|
|||
|
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. |
| Sponsored Links |
|
|||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise