HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... Drag and Drop Problem
Drag and Drop Problem
  View type:
I created a hotspot within a picture, add an ondrop action to display a message box. But when I drag my object onto the hotspot - nothing happens.

What have I missed?

thanks

Richard
 
First, ondrop event does not fires on hotspots (it could be better exclude it from events list for hotspots, but unfortunately this is not possible now).
The usual way of using drag-drop checks is to attach to ondrop event of entire target object:
CHECKHIT (dragged object id)
- some dependant action sequence

Hotspot replacement that extremely suitable for this task is introduced in version 2.3:
You can place new object Click Area (Design group) above the image (it is transparent by default), change its size to cover some image part, and use the same CHECKHIT action sequence on this Click Area object.
 
 
Thanks, I have solved this first problem now - following the method in the Planets demo.

Now I have a second problem.

I have introduced a variable, set to zero, then for each correct drop - checkhit, I add one to the variable using #varname+1. This is indented under the checkhit.

The last action is an if statement that says if the value is 9, goto the next slide/frame (Ive tried both)
However when I view the slide - it jumps immediately to the next slide - without any images being moved.

What might be going on?

thanks

Richard


 
 
 
This is getting stranger.

I got the transition working as I want it - if statement, and goto next slide.

However I then tried to do the same with a new frame - just by changing the goto command. And it jumped immediately before doing anything.
I changed the goto back to the next slide - but it still jumped to the frame. Delete the frame, and all works perfectly again - it goes to the slide exactly when I expect it to.
 
 
 
 
Hi, Richard!
The only suggestion that I can make while not seeing the course: some frame and/or slides has Advance parameter set to Immediately. Perhaps it was changed as a result of some experiment you made.
Anyway, if the problem will persist, please send us example of the course (to support@courselab.com) for investigation.
 
 
 
 
 
thanks, I've got round the problem now.
 
 
Thanks, I have solved this first problem now - following the method in the Planets demo.

Now I have a second problem.

I have introduced a variable, set to zero, then for each correct drop - checkhit, I add one to the variable using #varname+1. This is indented under the checkhit.

The last action is an if statement that says if the value is 9, goto the next slide/frame (Ive tried both)
However when I view the slide - it jumps immediately to the next slide - without any images being moved.

What might be going on?

thanks

Richard


Subject:
Message options
No additional options