Flasher Archive

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


Subject: Re: FLASH: Moving a symbol according to the Mouse direction of movement.
From: Gregg Caines
Date: Sun, 20 Aug 2000 13:53:47 +0100

The only way to keep track of the mouse's coordinates is
with a small invisible draggable movie clip, locked to the
center of the mouse. You really test for the movie's
coordinates, and not the mouse's.

You then have the ability to set the x-position and y-position
of your menu according to the x-position or y-position of the
mouse. If you want the menu to slowly slide across to the
same x-position as the mouse, you might try a loop that adds
or subtracts from the menu's x-position whenever the mouse
clip's x-position is greater than or less than that of the menu.
That method will move the menu more fluidly than if you simply
get it to jump to the same position as the mouse right away
(by simply making the menu's x-position equal that of the
mouse). If you want to get even more complicated, you can
can get it to move 1/2 the difference everytime If you make
sure to use int to round the number each time, you will
eventually reach a point where it will reach the same x-position
of the mouse-clip. I think that method is best and looks most
natural, but it any of these methods will get the job done.

Good luck!

---------------------------------------------------
Gregg Caines
n e o m e t r i x systems inc.
http://www.neometrixsystems.com
gcainesatneometrixsystems [dot] com


> Hi Flashers
>
> I am grappling with a basic problem - how to move a symbol according to
the
> direction of the mouse's movement. What I have been asked to create is a
> menu system that moves towards the mouse as the user moves towards it
> (horizontally only), whilst the mouse is within the symbol's bondaries.
>
> It's not hard I'm sure but I'm new to the more complex behaviours in Flash
> and could do with a bit of a pointer to get me started.
>
> Thanks
>
> Ben Houghton
> Freelance Multimedia Ebusiness Developer
>
> Production Manager
> www.akoluthic.net
> Programmer
> www.visuality.co.uk
>
> m: 07880 520265


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NudeGuru.com is proud to sponsor the Flasher list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IT'S THE ART OF MONEY, HONEY!
Tips and Advice from some of the most popular Flash
artists + industry power-brokers on how to hold onto
your rights, negotiate contracts and get full value
for your work.http://www.nudeguru.com from Franke James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  FLASH: Moving a symbol according to the , Ben Houghton

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