Freeform drag and drop

Aug 31, 2014

Hi

I am creating a drag and drop where users drag ovals from one side to the other. I have set it up so that lines appear to show the connection from one side to the other. Each line is a different state on the object.

I have most of the functionality figured out but when an object has been moved to the other side and then you drag a new oval over the top to replace it, I can't figure out how to get the old line to disappear.

In the example below b has been replaced by c but the line where it was is still there.

There are two options I can think of

1. Creating a trigger for when an object is replaced to change the line state (Change it to normal so the line is removed)

Or

2. Removing the option to replace an object with another object once it has been dropped (locking the drop state so nothing else can land on top of it)

However I haven't been able to find a solution for either to get it to work.

3 Replies
Chris Fletcher

Presumably, you have 36 lines (6 for each letter) all set to hidden and then a trigger for when, for instance, 'a' is dropped on dropTarget1 that makes the line that goes from 'a' to dropTarget1 change to normal . Could you not then have triggers for all other lines that point to that drop target that change them to hidden when 'a' is dropped on it?

Something like this...

Change stage of line1 to normal when object ('a') dropped on dropTarget1

Change stage of line2 to hidden when object ('a') dropped on dropTarget1

Change stage of line3 to hidden when object ('a') dropped on dropTarget1

Change stage of line4 to hidden when object ('a') dropped on dropTarget1

Change stage of line5 to hidden when object ('a') dropped on dropTarget1

Change stage of line6 to hidden when object ('a') dropped on dropTarget1

Change stage of line7 to hidden when object ('a') dropped on dropTarget1

Then do the same for every object on every possible drop. For example, at the moment, you have 6 objects and 6 drop targets, so you'll need to do 7 triggers for every possible location of each object. I make that 252 triggers...

Chris

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