Jump to content
Search Community

*BUG - TweenLite.delay failing in Safari 4.0.5 & FP 10 (Mac)

braitsch test
Moderator Tag

Recommended Posts

In Safari, I'm experiencing a strange issue when attempting to fire a tween after a delay when that tween has already been executed once before.

 

I have a setup where I am using ExternalInterface to call methods on a SWF and execute a tween after a short delay. The first time I call the method on the SWF the tween executes fine, however if I call my method again it appears that the delay property is ignored and the tween executes immediately (however only in Safari!) FF and MSIE8 appear to be fine.

 

So it's very likely this could be a plugin issue on FP MAC 10,0,42,34.

 

In case anyone else experiences this, here specifically is my code and workaround :

 

I have an HTML button in the DOM - I click it and call a startTween method on a SWF embedded in the page.

 

My startTween method just simply tweens a box after a 1 second delay and calls back out to the DOM onTweenComplete.

function startTween()
{
   TweenLite.to(_box, 2, {y:-1000, delay:1, ease:Quad.easeOut, onComplete:onPlayComplete});
}

function onPlayComplete()
{
   ExternalInterface.call("TellDOMTweenComplete");
}

 

TellDOMTweenComplete just sets the CSS visible property of the SWF to false.

 

Now if we click our HTML button again, I toggle visibility of the SWF back to true and call startTween on it, however at this point the Tween executes immediately instead of after a 1 second delay.

 

Workaround - use setTimeout or a native AS3 TimerEvent.

 

Just wanted to post in case anyone experiences this.

 

*EDIT - I'm using TweenLite v11.2*

 

Cheers,

Stephen

Link to comment
Share on other sites

Could you post a full example that demonstrates the issue? I wonder if there's something else going on but it's tough to investigate without a working example. You're not using nested functions, right? And you've got the latest version of the GreenSock stuff? If there's a bug at all, it would almost surely be in the Flash Player because it's not as though there's any conditional logic in TweenLite that senses the browser and runs differently based on the result. As Steve Jobs likes to point out, Flash is a bit buggy on the Mac :roll:

Link to comment
Share on other sites

Hi, nope no nested functions. Just a straight call into the public method in the SWF from JavaScript via ExternalInterface.

 

I agree, it's probably something in the Safari Flash Player for the Mac - but just wanted to document it here in case anyone

else starts scratching their head.

 

I will post a quick example page here in a bit.

 

Cheers,

Stephen

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...