2 Replies Latest reply on Dec 27, 2015 1:15 PM by Tram1

    Adobe edge animate. Parallax inside symbol

    Tram1

      Hello. Help me please to make parallax inside symbol, not the whole stage

      here is the project: Dropbox - Untitled-4.rar

        • 1. Re: Adobe edge animate. Parallax inside symbol
          joel_pau Level 5

          Hi,

           

          Here is an idea:

          compositionReady code:

          var duration = sym.getDuration();

          var width = sym.$("Stage").width();

          sym.setVariable( "onMove", function(posX, posY){

          var timeline = Math.round(posX/width*duration);

          sym.stopAll(timeline);

          } );

           

          Stage.mousemove code:

          sym.getVariable("onMove")(e.pageX, e.pageY);

           

           

          Note:

          sym.stopAll() targets all symbols.

          If you want to target some symbols, you can use the code below:

          var duration = sym.getDuration();

          var width = sym.$("Stage").width();

          sym.setVariable( "onMove", function(posX, posY){

          var timeline = Math.round(posX/width*duration);

          sym.stop(timeline);

          sym.getSymbol("s1").stop(timeline);

          } );

          • 2. Re: Adobe edge animate. Parallax inside symbol
            Tram1 Level 1

            Awesome! it works, thank you very much!! )

            now it's time to study! ))