baker icon indicating copy to clipboard operation
baker copied to clipboard

Using adobe edge with "three-card" mode. not working

Open aspek opened this issue 13 years ago • 8 comments

Hi, I try to use animation form adobe edge with "three-card" mode.

in my case.I create easy animate such as rectangle move.And I have an animation on page1 and page2. When I running app start at page1. The animation can play smoothie. But if swipe go page2. An animation on page2 it not even to play. If swipe the page move to page4 and swipe back to page2 (for reload page) the animation come to work fine on page2. but not work on page1 I try using "blur" and "focus" even form "blur" and "focus" work fine but animation not work.

summarize page1(adobe edge) | page2(adobe edge) | page3(no animate) | page4(no animate) | page5(no animate)

If the page who's have using Adobe edge animation and adjoin page.The animation can run only page if it has even first to load Sorry for my bad English. I hope you can understand me. Thank

aspek avatar Feb 27 '13 18:02 aspek

If you use three-cards, the page loads in background.

You have two choices that should work:

  1. Use screenshots mode
  2. Use the windows focus event and start the Edge animation inside that event.

folletto avatar Feb 28 '13 00:02 folletto

I using focus and blur. Even from focus and blur it's work well. This my code

$(document).ready(function(){

   jQuery(window).bind("focus", function(event)
    {
        playAnim();

    }).bind("blur", function(event)
    {
       stopAnim();
    });
function playAnim(){

          var comp = $.Edge.getComposition("EDGE-6024696");
          var stage = comp.getStage();
          stage.getSymbol("animateCoverA").play(10);
         alert("on focus at page1")
}
function stopAnim(){

          var comp = $.Edge.getComposition("EDGE-6024696");
          var stage = comp.getStage();
          stage.getSymbol("animateCoverA").stop(1);
           alert("on blur at page1")
}

})

Why I know it work well. Because if I change stage.getSymbol("animateCoverA").play(100); Edge will go play frame(100) but it will stop at that frame not go on. You can delete or comment stopAnim(); Edge still not play. However I try to add code on Edge it's still not work. The best way I can solve change three-card to screenshots but this not the right way. Who can solve this problem please tell me how it work. Thanks.

aspek avatar Feb 28 '13 02:02 aspek

Why do you say that screenshots doesn't work for you? :)

For the rest, I don't think I have a solution. It looks like something about the WebView and we have almost no control there. Does it work in Mobile Safari?

folletto avatar Feb 28 '13 12:02 folletto

screenshot work good for me. So sorry about my bad English make you mislead. And don't forget the point " If the page who's have using Adobe edge animation and adjoin page.The animation can run smoothie only the first page is loaded" . I think it's the some variable from Edge is same name. OK I will test it later for this feature. Thanks you folletto .

aspek avatar Feb 28 '13 15:02 aspek

I have the same issue here. I think it's about background loading of Edge JS API , I will try to investigate whats happen.

qutehoot007 avatar Apr 17 '13 13:04 qutehoot007

I found the problem from the window.requestAnimationFrame that used to make animation in Adobe Edge, from the doc., it handle foreground and background states of the page.

Ref : https://developer.mozilla.org/en-US/docs/DOM/window.requestAnimationFrame

I suggest to override this method to solve the issue,

window.requestAnimationFrame = function (callback, element) {
       return setTimeout(callback, 1); 
}

qutehoot007 avatar Apr 18 '13 09:04 qutehoot007

@qusai87 many Thanks!!

aspek avatar Apr 18 '13 12:04 aspek

@aspek I'm experiencing the exact same problems with my book. Could you, please, specify where should I insert your code to make it work? Thanks!

wwarder avatar May 13 '13 19:05 wwarder