|
The “Move To” Action allows you to specify a specific location or page coordinate for the element to move to when the Action is triggered.
The “Drag Me” button below is set with an Action to move it to it’s original position on the page. Drag this button around in the “Sample” area, then click on the “Click Me” button to restore the “Drag Me” button to its original location.
Here’s how it’s done:
- Define your drag area - in this case, I created a Layout Area called “dragspace”
- Place your “Drag Me” image in the “dragspace” layout area
- Place your “Click Me” image in the “dragspace” layout area
- For the “Drag Me” image, create the following Actions:
|
|
(This Action constrains the Drag Me image to the layout area)
|
When -> Page -> Page Loaded Target -> (DragMe Image) Message -> Drag -> Constrain Drag Parameter(s) -> To Container Image
|
(This Action saves the original location of the Drag Me iamge)
|
When -> Page -> Page Loaded Target -> (DragMe Image) Message -> Object -> Save Location
|
These two Actions allow you to drag the Drag Me image around in the layout area. See the Drag Usage note for more details.
|
When -> Mouse -> Mouse Down Target -> (DragMe Image) Message -> Drag -> Start Drag Parameter(s) -> Until Mouse Up
When -> Mouse -> Mouse Up Target -> (DragMe Image) Message -> Drag -> End Drag
|
|
- For the “Click Me” image, create this Action:
|
When -> Mouse -> Mouse Clicked Target -> (DragMe Image) Message -> Movement -> Move To Parameter(s) -> Saved Location
|
|
That should do it - When the page is loaded, you can drag the “Drag Me” object around, and then use the “Click Me” button to restore it to its original location.
|