Copy link to clipboard
Copied
Hello community - this is my first post!
My question is: When a slide loads, with a drag and drop interaction in it, can the drag sources start off already positioned in a drop target? Below is more explanation of what I am trying to achieve and why.
I have five drag sources
I have two drop targets: drop target A and drop target B.
I would like the drag sources to start already in position (tiled) in drop target A.
In the “Accepted Drag Sources”” window for drop target B, Count is set to 1 and On Accept is set to Replace.
When a user drags a drag source from drop target A onto drop target B my variable is incremented by 1.
When user drags another drag source from drop target A onto drop target B the replaced drag source returns to drop target A and my variable is decremented by 1.
I wouThe advanced actions I can deal with, but I'd be very grateful for any guidance around whether I can start a slide with drag sources already positioned in a drop target. Thank you.
Copy link to clipboard
Copied
Actually it's my second post in the Captivate forum. My mind is turning to mush after so much swotting up on Captivate!
Copy link to clipboard
Copied
One or the requirements for Drag&Drop is that no overlap is allowed between objects. This would mean that your scenario is not possible.
Copy link to clipboard
Copied
Thank you Liybiri
Copy link to clipboard
Copied
Perhaps I do not fully understand what is being attempted but I was able to create two shapes and make them two distinct drop targets.
I then created four stars of different color and made them all drag sources. I placed two in one target and two in the other layered one on top of the other.
When I previewed the slide I was able to drag them all back and forth from one target to the other target.
So - in this sense - yes, a slide can start with multiple drag sources already inside of it.
Make sure the drag sources are the uppermost layers.
I didn't try to do anything with the actions, though. Perhaps that is the sticking point...?
What am I missing?
Copy link to clipboard
Copied
Hi Stagprime. Thanks for looking into this. I recreated what you described and it works beautifully until I add the advanced actions.
In short, what I am trying to achieve is:
When the drag source lands on drop target B the variable is incremented
When the drag source is removed from drop target B the variable is decremented (in my project the drag source is removed by being replaced by another drag source)
I cannot find a way to decrement the variable when the drag source is removed from drop target B. As a newbie my terminology may be incorrect here, but my understanding is that an "event" is needed to attached the decrement advanced action to. I don't believe there is an "event" relating to the removal of a drag source from a drop target. I know that there is an "event" for when a drag source sucessfully lands on a drop target. Therefore my thinking was to have a second drop target (in my example above "A") for the removed/replaced drag source to "land" back on and this would provide the "event" required for me to attach the decrement advanced action to. Unfortunately, it appears that your solution does not actually "snap" the drag sources into that drop target (and therefore the "event" I am looking for to attach the advanced action to decrement the variable does not occur).
Perhaps there's another way to achieve what I am looking for?
Thanks all again for your help.
Copy link to clipboard
Copied
You present an interesting problem.
I don't think any usable event is fired in Captivate by the drag object currently sitting on a target being displaced by another drag object. And even though the displaced drag object might happen to land on another target object, I don't think that counts as a usable even either because it wasn't dragged and dropped there.
You're on the right track though with the approach that, if an object has already been dropped on a target, you can use the Object Action fired by another drag object being dropped on the same target to decrement the variable associated with the previous object.
However, this Object Action really needs to be a Conditional Action that first looks to see the values of a number of other tracking variables before executing any actions.
For example, each Target Object would ideally needs to know exactly which Drag Object it is currently sitting on top of it. But unless you are always starting out with specific Drag Objects positioned over specific Targets and there is no randomisation of positioning involved. Only once you start dragging objects around and dropping them on targets do you get the possibility of using Conditional Actions to dynamically affect what is happening.
Your Object Actions need to be set up not only to increment or decrement variables, they also need to set the values of other variables that are tracking the positions of each relative object.
I haven't had to set up a drag and drop interaction to do all of this as yet but my gut is telling me that it's going to take some tinkering.
Copy link to clipboard
Copied
What does the variable actually track?
If the value decrements when it is replaced, it doesn't seem to be tracking the quantity of objects on the drop target since a replace condition would be a net change of zero.
Is the variable tracking the particular object and the status of whether it is on that target or not?
Greg
Copy link to clipboard
Copied
I think you're going to need two separate variables for each separate drag object. One of these variables will be the one that gets incremented or decremented for that particular drag object, and the other variable will be tracking which Target object that same Drag object is currently sitting on.
Each time a Drag object gets dropped on a Target, the Object Action triggered by the Drag object will have a number of Decision Blocks, each looking at a separate variable currently tracking which Drag object is on which Target and to eventually find the identity of the Drag object currently sitting on THIS particular Target. Then it will know which numeric variable needs to be decremented (that's one action).
Another action executed by the same Conditional Action (executed as an Object Action when this Drag Object is dropped on this Target) is to assign the value of its own positioning variable to identify which Target object the Drag object is currently sitting on.
Does that make any sense?
Copy link to clipboard
Copied
Ron, thank you so much for this. Based on what you say I think I get the idea. As a newie this will take me a few hours to play around with and understand fully, so I'm going to try to implement your suggestion at the weekend, maybe sooner (this is a hobby, not may day job). Seriously - thank you for engaging with this so fully. I'm blown away by everyone's helpful, constructive involvement and advice.
I promise to report back with how I get on.
Copy link to clipboard
Copied
There are actually 3 variables that are incremented. Each variable for a counter. I've previously been trying not to overload you guys with info, but I think I should now explain fully!
The user experience I am looking for
On the left you see a list of skills (drag sources). The grey box represents a CV/resume (drop target). On the right hand side are three employers. Each employer is looking for three particular skills. When a skill (drag source) is dropped onto the CV/resume drop target the counter (blue bars) of the employers is increased by one, if the skill dragged on to the CV/resume is one that the employer is looking for. So, dropping "Problem-solving skills" onto the CV/resume will increase the counter (blue bars) of those employers who are looking for problem-solving skills (B & C) by one. The counter (blue bars) of the employer who is not looking for problem-solving skills (A) would not increase. What I am trying to achieve (but have not yet) is that when a skill is replaced (i.e. leaves the CV/resume drop target) the counters decrease by one.
The approach I have taken
Bear in mind I only got my hands on this software about 2 weeks ago so I've probably massively over-engineered the (partial) solution! Any tips/critisism gratefully received!
Variables
The following variables are incremented appropriately when a skill (drag source) is placed on the drop target:
Counters
The counters (blue bars) are obviously, run off the variables. There are ten images for each counter.
All images are initially hidden.
Actions
There are 5 advanced actions - one for each skill:
The only difference between them is that, for example, lead_action increments var_emp_b_count and not the others. prob_action increments var_emp_b_count and var_emp_c_count and not the other, etc.
Details of the actions
Block 1: Increment the appropriate variable
Block 2: Hide all counter images (to wipe out what was showing previously)
Block 3: If var_emp_a_count is equal to 1, show (the blue counter image with 1 level on the counter)), else continue
Block 4: If var_emp_b_count is equal to 1, show (the blue counter image with 1 level on the counter)), else continue
Block 5: If var_emp_c_count is equal to 1, show (the blue counter image with 1 level on the counter)), else continue
All blocks from 6-32(!) do the same, but "is equal to X" and show "image X", as appropriate
Second drop target
What I haven't mentioned here (and actually haven't done yet) is the possible second drop target which the skills (drag sources) would possibly start off in.
Copy link to clipboard
Copied
That does help.
There are likely many ways to skin this one but my first thought without actually mocking something up would be to go ahead and have that drop target for the initial start point for all the drag sources. Make that start drop do all the decrements as appropriate.
So, the CV drop performs the increment and the start zone drop performs a decrement action.
When they manually move to the start zone the decrements will happen based on your actions. The increment and decrement actions can also have some state changes (rather than show/hide) with them for updating the blue bars.
I wonder, though, if you might be able to simply allow them to drop as many as they want onto the zone and remove them as they desire back to the start zone. That would make the setup a bit easier as I don't think we can auto update on replace.
I think this is doable in the long run but as Rod has suggested, it will require some logic gymnastics.
Copy link to clipboard
Copied
One thing I have discovered on complex interactions such as this is that pretty much every advanced action must perform all of the other advanced actions as well since every object that moves must recalculate all the values so that all things can be updated accordingly. It makes for some actions with very long strings of conditional blocks.