View Full Version : rts type Mouse
Krayzie
June 24th, 2004, 06:45 PM
i was thinking and i was wondering how to make a mouse that is like an rts type mouse, like when u click and drag you see a rectangle that selects items. it was just on my mind. if any one knows pls post it here:)
dbarbarian
June 27th, 2004, 01:50 PM
Make a box 1 pixel by one pixel. Make it into a movie clip.
When you click the mouse, attach that movie clip to the mouse's x and y postition and set two variables to keep track of the those x and y coordinates. When the mouse moves, change the x and y scale of the attached movie clip to the difference between the current mouse x and y and the beginning x and y. When you release the mouse button, just check if that hitTests any units, then remove the attached movie clip.
Krayzie
June 27th, 2004, 03:56 PM
awesome i'll try that thanks :)
dbarbarian
June 27th, 2004, 06:08 PM
I hope you get it to work. :)
Robman1
July 1st, 2004, 01:15 PM
theres an rts with this at flashkit
Krayzie
July 3rd, 2004, 12:04 AM
well i tried i couldnt get it to work does anyone know how?
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.