From: Ross FT on
Hi all,

I am attempting to set up a drag and drop question utilising text. I have set
them up in the individual display icons etc. What I want to know is it
possible to return the text once it has been moved from it's original position.
I can't use put back as the text can be moved to different target area spots.
If the user moves it to the wrong target area or to a target area already
occupied I would like to be able to move the text back to its initial start
point. I need to be able to grab the initial coordinates of the text and set a
variable to enable it to return to those coordinates depending on the uses
selections.

Ross


From: Mark Tomlinson on
Ross FT wrote:
> Hi all,
>
> I am attempting to set up a drag and drop question utilising text. I have set
> them up in the individual display icons etc. What I want to know is it
> possible to return the text once it has been moved from it's original position.
> I can't use put back as the text can be moved to different target area spots.
> If the user moves it to the wrong target area or to a target area already
> occupied I would like to be able to move the text back to its initial start
> point. I need to be able to grab the initial coordinates of the text and set a
> variable to enable it to return to those coordinates depending on the uses
> selections.
>
> Ross
>
>


Have a look at GetPostPoint, SetMotionObject and ObjectMovedID. You
should be able to set up some code that runs on a Catch All target area
that gets the initial display position (GetPostPoint) and moves it back
there using a move icon (SetMotionObject)

Mark
From: Ross FT on
Thanks Mark that has done the job nicely.
From: gdaminato on
Does it still work when you publish your file. I seem to remember that
SetPostPoint() is one of those functions that doesn't work at runtime. You
should test it.

If it doesn't work then you can (more) easily achieve what you need to do with
this:
EraseIcon(ObjectMatched)
DisplayIcon(ObjectMatched)

Grace D


From: Mark Tomlinson on
gdaminato wrote:
> Does it still work when you publish your file. I seem to remember that
> SetPostPoint() is one of those functions that doesn't work at runtime. You
> should test it.
>
> If it doesn't work then you can (more) easily achieve what you need to do with
> this:
> EraseIcon(ObjectMatched)
> DisplayIcon(ObjectMatched)
>
> Grace D
>
>
Grace

That will just cause the object to 'jump' won't it? Move instantaneously?

GetPostPoint works, SetPostPoint does not.

Mark
 |  Next  |  Last
Pages: 1 2
Prev: Authorware 7.0
Next: Swacnvrt.x32 & other xtras