Skip to main content
edm64045680
Inspiring
November 28, 2017
Question

Can drag sources start off already positioned in a drop target?

  • November 28, 2017
  • 2 replies
  • 844 views

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.

    This topic has been closed for replies.

    2 replies

    Stagprime2687219
    Legend
    November 28, 2017

    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?

    Stagprime2687219
    Legend
    November 29, 2017

    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

    edm64045680
    Inspiring
    November 29, 2017

    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:

    • var_emp_a_count
    • var_emp_b_count
    • var_emp_c_count

    Counters

    The counters (blue bars) are obviously, run off the variables. There are ten images for each counter.

    • One image showing 1 bar
    • One image showing 2 bars
    • One image showing three bars
    • Etc, up to 10 bars (actually I over did this because you can't get to ten with the options!)

    All images are initially hidden.

    Actions

    There are 5 advanced actions - one for each skill:

    • analy_action
    • comm_action
    • lead_action
    • org_action
    • prob_action

    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.

    edm64045680
    Inspiring
    November 28, 2017

    Actually it's my second post in the Captivate forum. My mind is turning to mush after so much swotting up on Captivate!

    Lilybiri
    Legend
    November 28, 2017

    One or the requirements for Drag&Drop is that no overlap is allowed between objects. This would mean that your scenario is not possible.

    edm64045680
    Inspiring
    November 28, 2017

    Thank you Liybiri