<doc>
  <legacy_id>1133</legacy_id>
  <name>move</name>
  <type>command</type>
  <syntax>
    <example>move <i>object</i> {[from <i>startLoc</i>] to <i>endLoc</i>|to <i>pointList|</i>rel[ative] <i>motion</i>} \  [in <i>time</i>] [without {messages | waiting}]</example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Images &amp; Multimedia</category>
  </classification>
  <references>
    <command tag="drag">drag Command</command>
    <property tag="location">location Property</property>
    <property tag="lockMoves">lockMoves Property</property>
    <property tag="moveSpeed">moveSpeed Property</property>
    <message tag="moveStopped">moveStopped Message</message>
    <function tag="movingControls">movingControls Function</function>
    <property tag="number">number Property</property>
    <command tag="stop moving">stop moving Command</command>
    <property tag="syncRate">syncRate Property</property>
    <command tag="lock moves">lock moves Command</command>
    <command tag="grab">grab Command</command>
    <command tag="unlock moves">unlock moves Command</command>
    <keyword tag="relative">relative Keyword</keyword>
    <keyword tag="without">without Keyword</keyword>
    <property tag="lowResolutionTimers">lowResolutionTimers Property</property>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary>Moves an <glossary tag="object">object</glossary> from one location to another.</summary>
  <examples>
    <example>move image "sprite" to the mouseLocation in 30 ticks</example>
    <example>move button ID 4 relative 50,50 without waiting</example>
    <example>move stack "Overview Palette" from 100,30 to 0,30 without messages</example>
    <example>move the mouseControl to the points of graphic "Polygon" in 10 seconds</example>
  </examples>
  <description>
    <p>Use the <b>move</b> <glossary tag="command">command</glossary> to animate <glossary tag="control">controls</glossary> or windows by moving them smoothly across the screen.</p><p/><p><b>Parameters:</b></p><p>The <i>object</i> is any visible <keyword tag="control">control</keyword> or open <href tag="reference/object_reference.rev">stack reference</href>. (You can specify a <keyword tag="card">card</keyword> with the <b>move</b> <glossary tag="command">command</glossary>, but moving a <keyword tag="card">card</keyword> has no effect.)</p><p/><p>The <i>startLoc</i> is an <glossary tag="expression">expression</glossary> that <glossary tag="evaluate">evaluates</glossary> to a <keyword tag="point">point</keyword>--a vertical and horizontal distance from the top left of the <glossary tag="current stack">current stack</glossary>, separated by a comma. (If the <i>object</i> is a <object tag="stack">stack</object>, the distance is from the top left of the screen.) The <i>object</i> is shown at the <i>startLoc</i> before the move begins. If no <i>startLoc</i> is specified, the move starts at the <i>object's</i> current location.</p><p/><p>The <i>endLoc</i> is an <glossary tag="expression">expression</glossary> that evaluates to a <keyword tag="point">point</keyword>.</p><p/><p>The <i>pointList</i> is a return-separated list of destination <property tag="points">points</property>. The <glossary tag="object">object</glossary> is moved to each <keyword tag="point">point</keyword> in turn during the move.</p><p/><p>The <i>motion</i> consists of a horizontal number of <property tag="pixels">pixels</property> and a vertical number of <property tag="pixels">pixels</property>, separated by a comma. A positive number moves the <glossary tag="object">object</glossary> to the left or down; a <glossary tag="negative">negative</glossary> number moves it to the right or up.</p><p/><p>The <i>time</i> specifies a total time for the move to take from start to end, in <function tag="milliseconds">milliseconds</function>, seconds, or <function tag="ticks">ticks</function>. If you do not specify a <i>time</i>, the speed of the move is determined by the <property tag="moveSpeed">moveSpeed</property> <glossary tag="property">property</glossary>.</p><p/><p><b>Comments:</b></p><p>Use the<code> move...relative </code>form of the <b>move</b> <glossary tag="command">command</glossary> to move an <glossary tag="object">object</glossary> in a straight line a certain distance from its current location. Use the<code> move...from <i>startLoc</i> to <i>endLoc</i> </code>form to move an object in a straight line from one location to another, without regard to where the <glossary tag="object">object</glossary> started. Use the<code> move...to <i>pointList</i> </code>form to move an object along a set of defined <property tag="points">points</property>.</p><p/><p>If you specify<code> without messages</code>, built-in messages are not delivered during the move.</p><p/><p>If you specify<code> without waiting</code>, the current handler continues immediately, and a <b>moveStopped</b> <keyword tag="message box">message</keyword> is sent when the move is completed. Otherwise, the <glossary tag="handler">handler</glossary> pauses until the move is complete. If you issue another <b>move</b> <glossary tag="command">command</glossary> while a previous <b>move</b> <glossary tag="command">command</glossary> for the same <glossary tag="object">object</glossary> is still <glossary tag="execute">executing</glossary>, the previous <b>move</b> <glossary tag="command">command</glossary> is halted, and the second <b>move</b> <glossary tag="command">command</glossary> starts up at the <glossary tag="object">object's</glossary> current location.</p><p/><p>To move multiple objects at the same time, set the <b>lockMoves</b> <glossary tag="property">property</glossary> to true before issuing the <b>move</b> <glossary tag="command">commands</glossary>. When you set the <property tag="lockMoves">lockMoves</property> back to false, all the pending moves begin at once.</p><p/><p><code/><img src="202651"/> <b>Tip:</b><code/> To easily move an <glossary tag="object">object</glossary> along a curved path, create a <keyword tag="curve">curve</keyword> <keyword tag="graphic">graphic</keyword> using the freehand Curve tool, then use a <glossary tag="statement">statement</glossary> like the following to move the <glossary tag="object">object</glossary>:</p><p/><p><code>  move button "My Button" to the points of graphic "My Curve"</code></p><p/><p>If you like, you can hide the graphic so that the object follows the invisible curve, but its path is not visible on screen.</p>
  </description>
</doc>