Drag and drop not working as expected

Mar 04, 2014

I've made some drag & drop interactions, where there are four shapes that can be dragged and only one target. Only one of the draggable shapes is correct and the interaction is set to allow only one item in the drop target. I've set it to allow two attempts.

Everything works as expected during the first attempt; if I drag a shape onto the target and then drag another one on, the first one moves away.

However, on the second attempt (after an incorrect first attempt and the Try Again layer has shown), it will allow two shapes on the target on the second attempt. The incorrect one is still there when the Try Again layer gets hidden, and it doesn't move away when another shape is dragged onto the target, as I'd expect it to.

Consequently, even if the second attempt is correct, it's counted as wrong.

I've recreated the interactions, and I still get this issue.

Any suggestions gratefully received!

16 Replies
Drew Simpson

Sure, thanks Ashley.

I've included two drag and drop slides for comparison because the first (Activity 5) behaves properly and doesn't seem to have the problem, although the second (Activity 6) does.

As far as I can see, both slides are set up the same and I can't see why one behaves and the other doesn't.

On both slides, the drag & drop is set up to "Allow only one item in each drop target", so I'd expect that when a second item is dragged onto the target, the one that's already there would jump away. This does happen in Activity 5, but in Activity 6 it only happens in the first attempt, and it fails immediately after the Try Again layer is shown for a second attempt.

Here's how to reproduce it...

  1. In the second slide (Activity 6), choose "Happy to have a go" (an incorrect answer). You'll see the "Try Again" feedback layer.
  2. Then you're returned to the activity for your second attempt.
  3. "Happy to have a go" is still sitting on the drop target. Drag any of the other possible answers onto the target, and the "Happy to have a go" object doesn't move away, instead the new answer just sits on top of it. Even if the new answer were correct ("Rational and objective"), it would now be marked as wrong. From here on, any subsequent objects dragged onto the target will make the previous one move away, but "Happy to have a go" stays put at the bottom of the pile.

I know I'm missing something, but I really can't see it!

Thanks for your help.

Rebecca Fleisch Cordeiro

Hi Drew,

I took a quick look at your file, and actually discovered (at least for me) that Activity 5 wasn't always working correctly on the 2nd attempt. I tried a series of 1st attempt/2nd attempt choices.

I've edited both activities in this way:

  • Try again layer: added a button to jump to the base layer when Learners click the Try again button
  • Base layer: Changed the properties to reset to initial state upon revisiting

This DOES set all the pieces back to their original locations, rather than having the last selected piece remain in place, which is a little different from your set up. Let us know if this works for you, and please shout out with any questions.

Ashley Terwilliger-Pollard

Thanks Becky for sharing that work around here - and the only additional piece you'd need to add Drew is a way to track how many times they've tried, as right now you could try multiple times. Since you're working with only two attempts, a simple true/false variable, that is adjusted on the try again layer would work. I set up an example on Activity 6 for you. 

Drew Simpson

Thanks very much Ashley and Rebecca, I can get these activities working now - which is a relief!

To add to it though, I'd really appreciate any suggestions on how I could do something similar with a couple of other slides further on in the same file.

I see that the method you've used to detect if an incorrect answer has been chosen is if the state of the correct answer's object is normal, but these other slides have four drop targets so I don't think I can use the same method here.

I've attached one of the slides, I'd very much appreciate your thoughts!

Thanks, Drew

Rebecca Fleisch Cordeiro

Hi Drew,

I don't think you need to do anything special here...unless I'm misunderstanding something Same steps:

  • Add trigger to Try again button to jump to base layer when clicked
  • Also, as Ashley reminded us (tx, Ashley!!!), create a T/F variable, I did as she'd done and called it TryAgain, default is False
  • Add another trigger to Try again button to adjust the TryAgain variable to True when users click the button
  • And, add another trigger on the Try Again layer to jump to the Incorrect layer if the TryAgain variable = True.

As she explained, the reason for this variable and trigger is that you only want to give users 2 tries.

Please shout out with any questions.

BTW, I like the way you created those puzzle pieces with the pix. Cool!

Ashley Terwilliger-Pollard

Hi Drew,

I'm not sure I understand your last question? You'll need to set up those triggers as Becky showed for it to work as the previous one did - so if you hadn't set those up, that would be why it wasn't working? 

Drew Simpson said:

Do you have any idea, by the way, if it was caused by something I did, or is it just something that happens sometimes? I'd like to be able to avoid it in the future if possible.

Drew Simpson

Thanks, I had set up the triggers on these slides and they're working, I didn't mean that - but do you mean I'd always have to use these triggers on all such drag & drop interactions? I thought they were a workaround for something that had gone wrong.

To clarify what I meant...

a) What I thought was "normal" behaviour that I've got on other slides like this is that, without using any of these triggers, the incorrect answer object will remain in place on the drop target after the Try Again feedback layer disappears and will then jump out of the way when another object is dragged onto the drop target.

I've attached one of the slides that has what I thought was normal behaviour. The correct answer is "Pragmatist", but if you try any of the others then you'll see what I thought should happen after the Try Again layer goes away: the incorrect answer is still in place but moves away when you choose another. There are no particular triggers managing this.

b) My problem slides don't work like this (although the workaround that you've kindly helped me with do establish a working solution), and I was wondering why their behaviour is different from what I get on other drag & drop interaction slides.

c) My question was, since I thought this was a workaround for something that wasn't working properly, did I cause the problem in some way at the outset, or is it a bug? Or, do you mean that what I'm seeing as a problem is in fact normal, expected behaviour? If so, I'm a bit confused!

I ask because, even with the workaround, what I thought was "normal" behaviour is still preferable because it leaves the incorrect answer in place for the user to refer to while making a second choice, rather than removing it, allowing the possibility  that they'd make the same choice a second time. Not a big deal really, but I was just wondering...

Thanks for your help and patience!


Rebecca Fleisch Cordeiro

Hi Drew,

Ah! I totally see what you're talking about now. That IS very strange.Check out Slide 2...I think it's working now.

Not sure what the problem was. At first I thought it might be because there were 4 targets in this example. So, I tested with a new D&D of my own, and it worked "normally", as you've described. That is, on the Try Again, the incorrect drags got "bumped" out of the way when replaced with a new drag.

  • I studied and studied your slide, and couldn't see a problem.
  • I created a new slide and began by simply copying and pasting your drag items and targets there. It didn't work (same problem as on the first slide).
  • I deleted your target shapes and simply placed new rectangle shapes as the targets...Ta Da! It worked.Determination: there's something "wrong" with the original target shapes.
  • I created a new slide and copied one of your drag puzzle shapes onto it. Filled it with white, added the blue glow and the question mark. Cut and pasted it onto Slide 2 and replaced one of my new rectangle shapes with it to make it the target. Tested it. It worked. (The reason for the C/P was so I could make a puzzle shape; I didn't want to use your target puzzle shapes since they were wonky somehow).
  • Copied and pasted THAT shape into your target positions. So, all new target shapes.

Everything is working.

Not sure if my notes are clear..kinda' hard to explain...but my only answer is that there was something funky going on with your original target shapes. I can't SEE what's wrong, but they definitely weren't working and all seems to be working now.

Man! SL can really make you tear your hair out at times, can't it?! Glad you pursued this to (sort of) get to the bottom of it

Please shout out with any more questions!

Ashley Terwilliger-Pollard

Hi Drew,

Thanks for the clarification! I see what you're describing now, and after reviewing Becky's troubleshooting steps in conjunction with your original file - it does seem that there was something wonky with this particular set up. I also don't see anything that would cause the issue within your file, which leads me to the other conclusion that the file/interaction was wonky as a whole. When that's the case, I like to check the following things:

- Are you working with all local project filesWorking on a network drive or an external (USB) drive can cause erratic behavior, such as file corruption, an inability to save changes, and loss of resources.

- If things start to behave erratically, I save the project, close and reopen it to give Storyline a fresh start. Then if the behavior persists you may want to try importing it into a new Storyline file. 

Thanks Becky for the awesome troubleshooting there - super hero status clearly demonstrated!   

Drew Simpson

Rebecca, I can see why it says "super hero" beneath your name!

Thank you so much for your time & expertise. I too had studied the problem slides, and had no idea what could be wrong.

Your investigative work made me wonder if there was any way to find out what was wrong with those drop targets. While I was wondering if their front-to-back order had anything to do with it, I tried sending the targets to the back - and it worked!

It also worked if I left the targets where they were and instead brought the draggable answers to the front. I started to think it must have been confused because the answers had been stacked up on a lower front-to-back level than the targets but then I found that your slide, the one that works, also has them stacked up with the targets in front of the answers - so I'm still confused!

Well, even though we don't know what, exactly, is going on, it's great to have at least somewhere to go if it happens again!

Real detective work! Thanks again!


Drew Simpson

Sorry Ashley, I'd missed your last post but I'm glad I've seen it now because I do work on a network drive. In fact it's a "My Documents" folder mapped to a network drive, so I'll change that.

The other tip about importing into a new file is also useful - I've had to do something similar when working with other software in the past, and I hadn't realised that it was handled so well in Storyline.

Thanks again both.


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