Flash WOLF

Learn Flash Together!
 
HomeFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 Mouse Controled

Go down 
AuthorMessage
DDWOLFER
Admin


Posts : 4
Join date : 2008-07-15
Location : On an island! duh!

PostSubject: Mouse Controled   Tue Jul 15, 2008 8:07 am

Hey,

In this topic I am going to teach you how to make a mouse controled object like how Virtual Worlds control there characters.

First make a character or a object. The highlight the character, and press F8 and name it and make it a movieclip. Then highlight it again and press F9 and Action Script should pop up. Copy and paste this code below.


onClipEvent (load) {
_x = 239.1;
_y = 184.9;
speed = 2;
}
onClipEvent (mouseDown) {
endX = _root._xmouse;
endY = _root._ymouse;
}
onClipEvent (enterFrame) {
_x += (endX-_x)/speed;
_y += (endY-_y)/speed;
}

There are a few bugs with this one but I will fix it. Press Ctrl and Enter to test the moive and it should start working. post on this topic if you have any questions.

Thanks,
DDWOLFER
Back to top Go down
View user profile http://flashwolf.forumotion.com
 
Mouse Controled
Back to top 
Page 1 of 1
 Similar topics
-
» Unable to perform Actions on Mouse over Elements in Selenium WebDriver
» Actual movement of the mouse over an object
» Command for mouse over in webdriver
» [Top Rated] Mickey Mouse Clubhouse All Seasons
» Need to do a simple Left Click in a text box

Permissions in this forum:You cannot reply to topics in this forum
Flash WOLF :: Flash CS3 Pro :: ActionScript 2.0-
Jump to: