-
1. Re: Accessing variables from a symbol?
rossfranks Dec 5, 2013 7:58 PM (in response to rossfranks)I also have the variables set in stage.compositionReady event
sym.coatVar = true;
sym.gogglesVar = true;
-
2. Re: Accessing variables from a symbol?
resdesign Dec 5, 2013 8:50 PM (in response to rossfranks)I would handle things differently. I assume goggles, coat, and noCoatNoGoggles are labels on the timeline.
I would put all the code in compositionReady and try this:
var gogglesVar = true;
var coatVar = true;
if ( gogglesVar == false ){
sym.play("goggles");
}
if (coatVar == false ){
sym.play("coat");
} else {
sym.play("noCoatNoGoggles");
}
-
3. Re: Accessing variables from a symbol?
rossfranks Dec 8, 2013 3:40 PM (in response to resdesign)Thanks resdesign,
yes you are correct, they are labels, but within the character's symbol timeline, I guess an image would help show what I want to do, so here it is...
So the user can click on the coat, goggles or door. And here's what I want: if the user just clicks on the door then the character walks through the door and runs out on fire and his eyes melting (ie label "noCoatNoGoggles"), if they click on the goggles only, then he walks through and runs out on fire (ie label "goggles"), and if they click on the coat only, then he walks through and runs out with his eyes melting (ie label "coat"). If the character clicks on both the coat and goggles, then the character walks through the door and the screen fades and goes to another scene.
So at the moment I have the goggles and coat change to false when you click on them, and then when the character walks through the door it should then check to see what each variable is set at and then jump to the appropriate frame label and thus the appropriate animation. But unforunately it's not working.
Unfortunately I dont think the code you gave me will work for what I'm after too because where do I place the false statement for the coat and goggles?
I hope that explains what I'm trying to do better.
-
4. Re: Accessing variables from a symbol?
resdesign Dec 9, 2013 5:41 AM (in response to rossfranks)I think that you should use setVariable and getVariable because it works across the composition. I am very busy with some deadline right now but if you post a link to you files, I am sure someone can help you further.
Also check out the samples here for the setVariable usage:
http://www.adobe.com/devnet/edge-animate/articles/showcase-sample-files.html
-
5. Re: Accessing variables from a symbol?
rossfranks Dec 10, 2013 9:24 PM (in response to resdesign)Ok thanks resdesign,
I'll look into that.




