Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

State management on mouse out

$
0
0

So I have a symbol (let's call it Raindrop to avoid confusion) that drop from off stage to on stage and bounces when you mouseover another symbol (call it Button). When you mouse out of the Button, then I want the Raindrop to fade. However, I just want the Raindrop to fade IF the Raindrop has completed it's drop. If the Raindrop hasn't completed it's drop, then I just want it to vanish. Here is the code that I did in a trigger at the end of the drop animation:

 

sym.setVariable("dropstate", "dropstate_end");

 

Here is the code I put on the mouseout of the Button. It is supposed to run a test to see if the Raindrop has finished it's drop:

 

var myDropstate = sym.getComposition().getStage().getSymbol("process").getVariable("dro pstate");

 

 

if (myDropstate == "dropstate_end") {

          var mySymbolObject = sym.getSymbol("process");

 

 

          mySymbolObject.play("process_reverse");

 

 

                    //set the value of a Symbol variable

          }

else {

          var mySymbolObject = sym.getSymbol("process");

          mySymbolObject.play("process_hide");

}

 

Anyway, it's not working. It does a weird flicker when I mouse out.


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>