Variables true/false with drop zone

Apr 30, 2014

Hi, I stucked at this:

I have a drop zone and 2 images.

I have 2 variables: "image1dropped" and "image2dropped" (set as false)

When you drop one of the images in the drop zone, the variable for that image changes to true.

When you drop one of the images in the drop zone, he checks if the other variable is true, and if yes, he shows a layer.

So, you only can see the final layer if the two images are at the drop zone.

The problem is:

You drop the first image in the drop zone, than you remove it. Now you drop the second one and the layer is show because the variable of the first one is true...

What I want is, IF is not there anymore (if you drop of) the variable need to be false again.

I try put another drop zone to set false, it works, but ONLY if the person drop the object in the zone... The problem is when people drop the thing outside all targets...

Any solutions for this?

Tnx a lot!

3 Replies
André Rodrigues

Nick Russell said:

Hi Andre!

I would have thought Michael's idea would be the ideal solution. But there is another way. You could set the images to a disabled state once they have been dropped on the correct target. That would prevent them from being moved again and triggering changes to your true/false variable


Yeah, that's a good Idead, I think this is the best way Tnx a lot man! Cya!

This discussion is closed. You can start a new discussion or contact Articulate Support.