Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

_x and _y Movement 1

Status
Not open for further replies.

BigBadDave

Programmer
May 31, 2001
1,069
EU
Just a: "quick tip"

When using onClipEvent(); to move an objects _x and or _y you should add updateafterevent(); to the actions


It helps to stop flickering Regards
David Byng
spider.gif

davidbyng@hotmail.com
 
How can I make the y pos move when the <down> button is pressed
 
Like this:

Code:
onClipEvent (enterFrame) {
    if (Key.isDown (40)) {
        _y -= 3 // move amount
    }
}
Regards
David Byng
spider.gif

davidbyng@hotmail.com
 
Remember that negative values move the object up (y) or left (x)...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top