title: Duplicate a variable in AS3
body: <p>I'm trying to swap two variables in ActionScript.</p>
  
  <p>I tried using:</p>
  
  <pre><code>a = 42
  b = 50
  
  tempvar = a
  a = b
  b = tempvar
  </code></pre>
  
  <p>to switch, but this doesn't work because the variables still reference the original value, so if I set b = a, and then change a, b changes as well.</p>
  
  <p>in ruby, you have clone(), but I don't know a similar method for AS3.</p>
  
  <p>Help?</p>