Jump to content
Search Community

settimeout ios

FWDesign test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I apology to post this here but I am desperate at this point. I will be short.

I have some settimeout's in my gallery in which I have used TweenLite which for some strange reason they are never triggered, basically if I touch and swipe the ios safari browser and hold for some time the timer is not triggered this is not happening all the time, is random behavior.

http://www.webdesign-flash.ro/p/html5_slot_machine_gallery/demo/

I think with your animation experience you can give me some hints, I've tried everything before posting here, by the way I even tried the complete method from TweenLite and that is working fine even if I touch and swipe the browser window, the method is called without problems.

Can you please explain to me what is happening with the setTimout while the browser window is scrolled on mobile?

 

Thank you for your help.

Link to comment
Share on other sites

Right, I have read that iOS 6 doesn't play nice with setTimeout() or setInterval() when they're called WHILE scrolling. It basically ignores them (nice, Apple!). However, I don't think that affects TweenLite/Max because:

  1. By default, GSAP's ticker relies on the requestAnimationFrame API rather than setTimeout() or setInterval()
  2. Even if you set TweenLite.ticker.useRAF(false), I believe that since the ticker constantly has one setTimeout() running, the one that was queued right before the scrolling behavior in iOS will get called as soon as the scrolling stops, thus the chain isn't broken.

You said that you noticed TweenLite.delayedCall() did NOT suffer from the funky behavior in iOS 6, right?

Link to comment
Share on other sites

I did not noticed any problems with TweenMax even with TweenLite.ticker.useRAF(false) so it is working fine.

 

How the heck apple made this crap possible, as a former flash developer I am so frustrated by apples bowcrap about their software...

 

Do you have any suggestion about how this can be fixed?

Link to comment
Share on other sites

Glad to hear the GSAP stuff is working fine and isn't affected by Apple's iOS 6 bug.

 

And yeah, I absolutely echo your sentiments about Apple and their hypocritical posture towards Flash, especially in light of the fact that there are massive amounts of bugs in their own stuff. Unbelievable. I'm shocked that they missed this setTimeout()/setInverval() thing. And on top of that, they botched the requestAnimationFrame functionality too! It doesn't fire as frequently as it is supposed to, and often it just totally drops out for long periods of time, especially when a page initially loads. Wow. They should be embarrassed.

 

As far as suggestions go, I'd probably recommend either using an approach like that github link you posted or do something like GSAP does with the constant loop. I wish I had an easy fix for you.

Link to comment
Share on other sites

  • 2 months later...

I think that I am experiencing this bug...though this was my first weekend using HTML5 and EaselJS, so it might just be a coding bug. Though I have a bunch of experience with AS3 and Greensock integration.

 

Anyway, the sample is here: http://www.birdinthecity.com/html5

 

The vending machine display panel on the right of the screen is supposed to rotate in new messages every second (sped up for testing purposes). But on iOS, TweenLite.delayedCall doesn't seem to get triggered at all and thus the first message remains. It works correctly across desktop browsers.

 

Any thoughts?

Link to comment
Share on other sites

Hm - I'm not aware of any unresolved issues with GSAP and iOS right now. Have you tried isolating the issue, like by just doing a TweenLite.delayedCall() and throwing a console.log() or some simple code in there to update HTML on the page to see if it's getting called? Or are you just assuming it's not getting called because of some other missing behavior?

 

I know for sure that there are bugs in iOS's browser not firing requestAnimationFrame events in certain situations, but GSAP has a workaround in place. I'm not sure if EaselJS's ticker implements any workaround, though. Have you tried turning off the requestAnimationFrame stuff for both EaselJS and GSAP to see if that resolves things? For GSAP, you just call TweenLite.ticker.useRAF(false). I don't remember how to do it in EaselJS, but I'm sure it's pretty simple.

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...