HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... Audio from previous slide continues to play for brief moment after navigation
Audio from previous slide continues to play for brief moment after navigation
  View type:
Each of my slides have a flash.swf that plays audio.

After navigating to the next slide, the previously audio track continues to play for a brief moment overlapping the current slides audio.

Any help debugging this issue would be greatly appreciated.

Thanks,
Kevin
 
I think it's a Flash Garbage Collector problem which might originate in the actionscript in de swf.

'Normally' html pages are distinct pages. Going to another page means all objects are destroyed and a new page is rebuild.
Going to another page in CL is not really another page, it just rebuilds the page with different content. That's why on slide 2 you can show items which are defined on slide 1. That's why a flash object you put on page 1 can still be there on page 2.

Now Flash has a garbage collector: whenever the Flash player determines several functions, items etc are not needed anymore the memory of these objects is cleared.

If the Flash player doesn't know it can clean this area, it will not do it. That's why Captivate movies are difficult to cope with in several circumstances: the are not properly coded and the Flash player cannot clean the memory used.

In the javascript from CL I cannot determine how exactly an object is destroyed but it seems the pointer to the object is set to null. Nothing more.

You might try several things:
- in the swf make an actionscript function like 'onUnload' which stops all actions and playback.
- if that doesn't work in CL call this function from javascript (use externalinterface) when you 'close' the page.

Or when closing the page you might try the javascript function
function SWStopSound()
and let the garbage collector do it's job, in time.
Subject:
Message options
No additional options