Show/Hide/Play SWFs with Flash to Lectora Communication

jseger Community Member Posts: 10
I have a problem with what appears to be a conflict with the Lectora OnDonePlaying event and the Flash stop() timeline action.

Here's the scenario:

I have a Lectora file that provides mainly the course UI framework. Within a content area, I have placed two Flash swf files that each contain an embedded FLV video and a few animations on the timeline. Each also contains a set of buttons to control the movie - Start Over, Pause, Play, and Goto End. The buttons all use basic AS3 to go to frame 1, stop(), play(), and go to the last frame. All of that works.

In Lectora, I want to display and play each SWF on the same page - to avoid a page click and reload of a second html page. The first plays when the page shows, and the second SWF is set to initially invisible and not auto-start. I originally thought I could just use the On Done Playing event on the first SWF to then say Hide itself, Show the second SWF, and Play the second SWF. That worked but seemed to cause a conflict with the Flash Pause (stop) button in that if I click the Pause button in the first SWF, it jumps directly to the second SWF. Its as if the Stop() action in FLash triggers the On Done PLaying action in Lectora. Is that possible?

I then set up a variable in Lectora called IntroEnd and have it set to initial value of "no". Then, in the Flash file, on the last frame of the first SWF, I set a flash external interface call to set the Lectora var IntroEnd to "yes". I can the debug and the variable is being passed into Lectora. So, I then set up some actions in a Group in Lectora that basically Hide the first SWF, Show the second SWF, and start the second SWF to Play - all with the condition that the Group of actions only runs when the var IntroEnd contains "yes".

When I test, once again all works if I just let the first SWF play out and the second starts and plays fine. However, if I click to Stop the first SWF, and then click the Goto End button, the first SWF jumps to the end and hides. The second SWF never shows or plays.

It's bit hard to explain, so I hope I captured the issue here.

I basically need a process for loading 7 large SWFs on a page, display and play through them in sequence, and allow each to have controls to control it's own timeline.

Any advice?