p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Flash (all versions) (http://p2p.wrox.com/forumdisplay.php?f=59)
-   -   how to move movieclips using code in AS 2.0 (http://p2p.wrox.com/showthread.php?t=82131)

yujhkgit January 5th, 2011 12:33 PM

how to move movieclips using code in AS 2.0
to move a movieclip in flash using code it is very simple, give the instance name of char (or any other name, but you will have to change the name in the code) to the movieclip you want to move.

open up the actions panel and click on your movieclip. now if you want to move the movieclip up with arrowkeys, copy&paste this code into the actions panel;



// this can be copied&pasted, but do not copy the onClipEvent part
// don't forget that the y axis is reversed!

"char" is the instance name, and the _x can be changed to _y

dont forget to change it to RIGHT, UP, or DOWN

All times are GMT -4. The time now is 06:21 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.