unloadAndStop in Flash Player 10 – Necessary for Captivate and AVM1 Content

 

I spent a good part of yesterday trying to figure out a solution to this problem:

- I had coded a course ‘gui’ with navigation controls such as previous/next buttons, and a List component for the non-linear navigation.

- The list component is populated via an XML file that contains the path to the individual swf, and the label, and also an icon string (an undocumented feature – that’s another post).

- For the prototype, most of the content was in AS3, developed purely in Flash, with the exception of a single Captivate-generated swf that was published from Captivate 3, and thus an AVM1 swf.

- After getting the prototype right, I decided to develop the remaining content in Captivate whenever possible to speed up things. After putting together a few more Captivate-generated swfs, I tested and the result was that whenever I navigated away from a Captivate swf and loaded another Captivate swf, the sound from the previously loaded Captivate swf’s would continue. In other words, using the unload() method of the Loader class doesn’t truly unload the content of the Loader. To make things worse, I was even *removing* the Loader instance and creating a new one. Still, the audio would keep playing. Terrible!

After googling I come to find out this is a known issue:

http://www.gskinner.com/blog/archives/2008/07/unloadandstop_i.html

So, the workaround was to use the unloadAndStop method of the Loader class, which unfortunately is only available in Flash Player 10. Fortunately, I have the leeway to force my users to move to FP10 if they have to. Most people wouldn’t.

Of course, then after I get that sorted out I come to find out that Captivate 4 was released yesterday : ) I have started to publish the Captivate’s with the ‘AS3′ spec but I’m not sure if that helps or not.

Has anyone tried that?

This entry was posted in Captivate, Flash and tagged , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

 

2 Comments

  1. Posted September 9, 2009 at 12:10 pm | Permalink

    my problem sounds similar to yours but i can’t publish my Flash application with the player 10…
    So i dont know what to do…

    If you’ve got any idea email me !

  2. Posted December 8, 2009 at 6:24 am | Permalink

    Yes, publishing captivates’s with AS3 is a way to go

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

Subscribe without commenting