Animation to move with mouse movement?

How can i move an animation backward and forward with the movement of the mouse on the x axis?
all of the mouse trailers etc move an object which is linked to the mouse. however i don’t want my movie clip to move around the screen.
I have an animation of a wave form which I’ve animated to look as if the wave is increasing and decreasing, ie its amplification. I’d like to move this animation with a mouse movement. ie move your mouse to the left and the wave form increases. move your mouse to the right and the wave form decreases.

I have made an attempt. but it is very clunky and the link with the mouse isn’t exact. the animation of wave form moves only if the mouse moves to one side or the other. it’s not instant, like the infinite menu.
any ideas how to do this?

here is my clunky code:

if (_root._xmouse>=300) {
_level0.animation.nextFrame();
} else {
_level0.animation.prevFrame();
}

hmmm… looks like its a flaw in your code.
this is so because you tell it only to go to the next frame if its past the 300 pixle mark and if its not it will indefinatly go back to the first frame;
i would make it some thing like this (beware its not tested).
put this on you first frame.
onMouseMove = funciton(){
mousedist=_xmouse-oldXmouse;
oldXmouse=_xmouse;
if(mousedist>0)_level0.animation.nextFrame();
if(mousedist<0)_level0.animation.prevFrame();
};
go for it but i did this thinking that your animation was a movie clip.

It works, fantastic. thanks so much booyaka.
you’ve saved me another 4 hours fiddling around getting frustrated…
m

heh no problem if you can give me a link so i can see what you made

  • and im off.

it’s part of a larger site which i’m still working on. which at this address.

http://thap.sca.usyd.edu.au/2003/mva/~mmiranda/museum_rumour/

you’ll need a broadband connection.
i’ll be putting up your contribution in about 1 hour. i’m very slow. sorry.
Look for a button that says <rumour speed>
best m

wow your pronjext it preetty cool
i wish i had as much ambition as you do
but i only code my only drawing tool is the drawing API
oh welll.

thanx. i’m trying. i wish I could speak actionscript as well as you.
if you have an url i’ll go haave a peak.
m

http://www.angelfire.com/art2/booyaka
yep there it is its quite a simple site i change it when im bored or im lonely =/
srry for my poor english
-and im off

love it.
m

are you studying physics? i’ve been looking at some pretty cool physics sites as part of my research for my museum of rumour.
http://www.colorado.edu/physics/2000/index.pl

i was trying to do one of their graphs of waves.
all the best
m

wow thanks for the link ill read about it later.