How to know when imported SWF is done?

Aug 28, 2012

I have some imported SWF files. Some are animations and others are interactions. I either want the user to watch the whole animation or perform some action in the interaction.

Then I would like to allow them to continue on.

Is there a way to know when the imported swf is done?

I tried setting a trigger for when the imported timeline is finished, but it had no idea.

Is this something we have to wait for the SDK for?

16 Replies
R Rothrock

Where would I see that? I don't see it anywhere on the timeline tab. Nor do I see it when I select the imported clip and select the MovieTools Options on the ribbon.

Oddly enough It does seem to think the import swf is a video. There is a tick box for show video controls, but checking it doesn't seem to do anything.

Brian Allen

This may not be helpful, but here is a short tutorial for inserting Flash media, which also links to adjusting video controls: http://community.articulate.com/tutorials/products/adding-flash-files.aspx

You should see the timeline at the bottom of the storyline authoring window.  If your imported swf file is on the main layer, you'll see it on the base timeline, otherwise (flash is on a slide layer)  you'll have to select that layer to view the timeline for that layer, as each layer has an independent timeline.

R Rothrock

The first link seems to suggest that you will get different results by either inserting the swf as a Flash object or as a video object. But either way it doesn't make a difference.

But all this talk of timeline is telling me that when the trigger says "Timeline ends of Video 1 myTest.swf" that means the actual length of the timeline in Storyline, not the actual timeline of the imported swf. Right?

So the answer is there is no way for Storyline to know when and imported SWF is "done"?

Brian Allen

My experience is that the timeline will adjust to match the length of your imported swf, and then some if you have anything else on your slide.  You should be able to view the entire length of your swf file in the timeline, and even place other objects and triggers in the time line after your swf file finishes.

Is your swf file in the main timeline of the slide, or is it on a slide layer?

R Rothrock

It is on the base layer timeline. And my timeline isn't adjusting to match the length of the imported swf. (Using either method of importing.) My test file is shorter than the default 5 seconds. So that might be the issue....

Yes that was the issue. But it still seems that the trigger is actually connected to the storyline timeline and not the timeline inside the actual imported swf?

R Rothrock

What I mean by that is that if the storyline timeline gets adjusted (longer or shorter) the trigger will go with it, not with the actual end of the animation.

Also if I add a playback control to the imported swf  and pause it (the imported swf) the baselayer timeline keeps going and the end of timeline trigger will be called independent of whether the swf timeline has completed.

Strangely the playback control seems to know how long the embedded swf is, but there doesn't seem to be any connection to the baselayer timeline. And the Trigger is about the baselayer.

There are work design work arounds for all this. (Doctor: Well if hurts when you lift your arm, don't do that.)

But I'm just trying to see if there is a foolproof way to say, "When this imported swf is done. And there doesn't seem to be.

hmmm...... so while typing that it got me to thinking.

It seems if I import the swf as a video and use a "Media completes" event, then it works. (The media completes event isn't available if the swf is brought in as flash.)

R Rothrock

Looks like I was too happy too soon!

So the media completes event works if I bring the swf in as a video, but then it looses any interactivity in the swf. (I think it is from the invisible pause/play "button" that gets layered over videos) That is fine for simple animations that only need to play through.

But if I want to have the user click and interact it seems I'm back to not having a way to know when the imported swf is finished.

Brian Allen

You probably already ran across this, but just happened to run across this note in one of the video tutorials -

"Note:  Videos will be automatically synchronized with the slide and will be controlled by the timeline (although you can choose to provide a separate playbar for your video if you like).  If you want to insert an interactive SWF file that plays independently of the slide and which should not be controlled by the timeline, you will need to insert it using the Insert > Flash option instead."

This discussion is closed. You can start a new discussion or contact Articulate Support.