Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: FLASH: intelligent cursor
From: Mountain, Mike J
Date: Wed, 15 Mar 2000 11:34:03 GMT


http://www.users.globalnet.co.uk/~mowgli/flash/f16cursor.html

Folks

As you can see from the above, I've been working on some means of having an
intelligent cursor which points the direction the mouse is going (numerous
applications in games etc.) but I can only get it to work properly at 90
degree intervals - ie. horizontally and vertically.

The method I'm using is checking it's old position then comparing to see if
it falls within four sectors of an X and Y grid...the centre of the cursor
being (0,0)...so if the new position y>0 x=0 then it points down etc.

I've tried numerous methods of getting the 45 degree angles to work, none of
which work properly, most are pretty "jerky"...so what with all this Bezier
curve business flying around I've decided to dig this one out again and do a
rethink.

So how do I do it? What would be ideal is detecting the new cursor position
and from this calculating the angle with which to rotate the f16
mc.....(with maybe a 10 degree "snap").

If anyone can provide any suggestions I'd be most grateful.

Cheers

Mike M




flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and The Flash Film Festival
"The World�s Premier Flash Solutions Conference and Expo"
March 27-29, Nob Hill Masonic Center, San Francisco, California

-Register before Feb 25 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]