PDA

View Full Version : Flash Game IS Project



xerent
March 20th, 2004, 08:07 PM
*slinks in post #1.... you can just smell the newbie*

Anyways, I'm working on an independent project for school, programming a game in flash. I've done flash work, but little actionscripting beyond 'mouseover' events and such.

I'm making a game based off of Mage Knight (http://www.mageknight.com). It's a tabletop game, using minatures on dials as warriors. I'm early in the project still, having just done a decent amount of flowcharting.

I'm not looking for people to hand me chumks of code, as I DO want to end up learning something. But I haven't found what I am looking for from browsing online tutorials, and having heard my professors confess they themselves know nothing, I've been reduced to forum begging. ^^;;. If it is allright, I may necropost this thread often to ask for assistance.

What I want is for a user to click on an object (minature) and drag it around. This was easy enough, but I only want to let the drag it around within a set radius of the origional objects x/y position. How would I do this?

flash4food
March 21st, 2004, 12:20 AM
easy, calculate the distance from the original place of the figure to the mouse/position of the figure being dragged and only allow it to go further away if the distance is less than the radius.

if u need help coding this just say so and also say if u are using flash mx, 5 or what