HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... move dragged Objects to an absolute position
move dragged Objects to an absolute position
  View type:
I built a little drag and drop szenario:
I have an image of a heart an four textboxes that could be dragged by mouse.
These four textboxes have an onclick-action :
VARIABLE(Nama='drop',Value='lV',Scope='CurrentSlide')
The Name is different for all four objects

I have also four textboxes without any text, border and fill.
I use these textboxes as targets.

The ondrop action I defined for the 'ziehenlV'-target is:

CHECKHIT(Object = 'ziehenlV')
DISPLAY(Object ='richtigUe2',Display='Show',Effect='Object',Duration='1000')
DISPLAY(Object ='richtigUe2',Display='Hide',Effect='Object',Duration='0')
ELSE
DISPLAY(Object ='falschUe2',Display='Show',Effect='Object',Duration='0')
DISPLAY(Object ='OKUe2',Display='Show',Effect='Object',Duration='0')

When one of the objects is droped on the target where the 'ziehenlV' has to be droped, there will be shown a textbox that informs the user if he is right or not.
If he is right the textbox is hidden after a second and the dragged object remains in place.
If the user is not right the textbox is not hidden and another textbox with text OK is shown.

On the OK-textbox I defined an onclick-action as follows:

IF(Condition='#drop=='rV'')
MOVE-START(Object='ziehenrV',X='170',Y='200',Additive='Replace',Duration='0')

and so on for all four textboxes that can be dragged.
After this I hide the OK-Textbox and the false-textbox.

So if one object is droped on the wrong target there will be shown a textbox with text 'try again' and an OK-textbox.
When the user is clicking the OK-textbox, the textboxes will be hidden and the object will be moved on the defined position.

This all works very well with internet explorer and with google chrome, but it doesn't work with firefox and on my google Nexus tablet.

Is there any way to make it working in these browser?
Or is ther a better way to solve the problem of returning droped objects to a defined position, when they did not hit the right target?

I hope this long post is ok, but I don't know how to explain it shorter.
 
18.05.2013 23:37 Lohse Svenja wrote:
it doesn't work with firefox and on my google Nexus tablet.Is there any way to make it working in these browser?
Or is ther a better way to solve the problem of returning droped objects to a defined position, when they did not hit the right target?


The browser problem might be due to the way the web page generated is described, I seem to remember there was an answer to this but I can't find it at the moment.

Why not just add another action, so far you have a check ondrop and some user feedback.
Just add a few actions to the block which tells the user that the drop is in the wrong place to move the object back to its start position.

So dropping in the wrong place gives the try again message and when that message block is closed the string of actions continues and moves the object back to where it started.
 
 
20.05.2013 20:57 James Nick wrote: Why not just add another action, so far you have a check ondrop and some user feedback.Just add a few actions to the block which tells the user that the drop is in the wrong place to move the object back to its start position.So dropping in the wrong place gives the try again message and when that message block is closed the string of actions continues and moves the object back to where it started.
Hi, I defind this aktion already, but not at the box that is telling the user that he is wrong. It`s defined on a box called OK. This box lays on top of the `wrong` box.When I click this OK-box the `wrong` box is closed and the OK-box is hidden. In crome and ie also the object moves back, but not in Firefox and in crome on my tablet.
Subject:
Message options
No additional options