|
-
Problem with boolean var
The code below allows me to place the object at a certain position when clicked, then click it at its new position to send it back. Then that's it, the boolean value doesn't change after that allowing me to keep clicking it back and forth. With a numerical value I could ++ for a loop, but with a boolean, I'm stumped.
var taken:Boolean = false;
function move(event:MouseEvent):void
{
if(taken == true)
{movie_mc.x = original_mc.x;
movie_mc.y = original_mc.y;}
else
{movie_mc.x = hold_mc.x;
movie_mc.y = hold_mc.y;
taken = true;}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|