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

Accessing variables from a symbol?

$
0
0

Hey there guys, sorry I'm not much of a coder and am a designer but here's my issue.

 

I have a character who is a student who is going to enter a chemistry lab, but before he does, the user has a choice to put on a coat and goggles on the character, so when the goggles are chosen the gogglesVar == false, etc and then when you click on the door the character will walk through the door and then get to this code (which is inside a symbol)

 

if( sym.getComposition().getStage().gogglesVar == false ){

 

sym.play("goggles");

 

}

 

if( sym.getComposition().getStage().coatVar == false ){

 

sym.play("coat");

 

}else{

 

sym.play("noCoatNoGoggles");

 

}

 

but no matter what i choose the code always goes to sym.play("noCoatNoGoggles");

 

is that because it's in a symbol and doesn't see the gogglesVar == false anymore?

 

Hope that makes sense, and thanks in advance.

 

Ross.


Viewing all articles
Browse latest Browse all 9897

Trending Articles



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