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.
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
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