Showing posts with label embedded swf. Show all posts
Showing posts with label embedded swf. Show all posts

Thursday, November 5, 2009

Adobe Presenter Embedded swf appears choppy or twitchy

Problem:

When embedding a swf animation into adobe presenter, the final movie apears twitchy or 'stuttering'. This occurs because the "Control using presentation playbar" option is selected, and Presenter is doing odd playback control on your swf.

Basically, to keep the slide time synched with your swf time, it is either jumping ahead or backwards to keep them together, not ideal at all!

Solution:

1. Rob Rodes: http://www.connectusers.com/forums/cucbb/viewtopic.php?id=2523

I did not find this solution to work for me, but it might for you, it's pretty low effort to try and if it works great!

2. My Solution:

First I cut all of my main timeline and chucked it into a movieclip which then got thrown on frame 1 layer 1 of the main stage (make sure the main timeline is the same length as the new movieclip timeline), we'll name the new movieclip "allAnimations".

Now, the playback bar for presenter won't have access to this movieclip, so the stuttering effect is gone, but what if the user is jumping back and forward, how do we sync this animation up with the main timeline?

Here's the magic (Actionscript 2.0):

allAnimations.onEnterFrame = function()
{
if(this._currentFrame - this._parent._currentframe > 150)
allAnimations.gotoAndPlay(this._parent._currentframe)
else if(this._parent._currentframe - this._currentFrame > 150)
allAnimations.gotoAndPlay(this._parent._currentframe)
}

Basically if the animation's timeline differs from the main timeline by more than 5 seconds then sync them up!

This is a hack, i'm positive there is an unfound better solution, but for now this may work for you, if so enjoy!