-
X and Y madness
Hi, I am having trouble getting a movie clip to move around a specific and limited area of my movie. I want "dis_arrow" to only be able to move "up" when it isnt at the following coordinates: x = 353.1 y = 214.7. Any ideas whats wrong with the following code?
up_bt.onRelease = function(){
if ((dis_arrow._x = 353.1) and (dis_arrow._y = 214.7)) {
Void
} else {
dis_arrow._y-=19.5;
}
}
-
PHP Code:
up_bt.onRelease = function(){ if (dis_arrow._x == 353.1 && dis_arrow._y == 214.7) { } else { dis_arrow._y-=19.5; } }
This is the proper syntax to use... If its in a "if" statement, "=" should be "==".
Also, "&&" represents "and"
-
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
|