Can someone tell me why it does not work?

Working on a project where an icon action depends on the State of another icon. For instane-there are three doors on the scene, with the ability to turn red, blue or green. If the first door is blue, then third opening of the door if it's the same color. If the second door is red, then third opening of the door if it is the same color, etc. Using conditional statements came up with rough code, but encountered a wall. Have not been able to find the right commands to the code base on the labels.

The following two files contain less than 15 lines of code. I would appreciate any advice anyone with a handle on the subject.

The first is that I got with the code still works:

http://www.filedropper.com/sampledoorworks

This version is where everything takes a turn for the worse:

http://www.filedropper.com/sampledoordontwork

I don't know how show you the code relates to three doors and the line... If ('one') {fly anywhere.

You need to assign instance names to the doors so you can target their code.  Let's say that you name door1, door2 and door3.  If the idea is to check if the two doors are the same color (frame) then, you could do something like...

if(door1.currentFrame == DOOR2.currentFrame) {}

do something for doors 1 and 2

of other if(door1.currentFrame == door3.currentFrame) {}

do something for 1 and 3 doors

of other if(door2.currentFrame == door3.currentFrame) {}

do something for 2 and 3 doors

}

Tags: Adobe Animate

Similar Questions

Maybe you are looking for