nasih
August 17, 2003, 11:21am
1
Hi
thanks for your time.
problem :
There is one wheel that Rotating using script.
when mouse moving to left , the wheel have to rotate TO LEFTward and
when mouse moving to right , the wheel have to rotate TO RIGHTward .
Here i am attaching FLA , please have a look and Help!
Nasih
system
August 17, 2003, 12:02pm
2
Put this code within the onEnterFrame handler…
[AS]var dir = (_root._xmouse>this._x)-(_root._xmouse<this._x);
this._rotation += dir*25;[/AS]
… Like that?
system
August 17, 2003, 1:16pm
3
Yeah…works fine Thanks Kax :thumb:
-----------------------------------------------------------------------onClipEvent(load){
stop();
var Elastic = .03;
this.onEnterFrame = function(){
var dir = (_root._xmouse>this._x)-(_root._xmouse<this._x);
this._rotation += dir*25;
this._x += (_root._xmouse-this._x)*Elastic;
}
}
oh…when u posted … i fell asleep Sorry, if i am late.
Nasih
system
August 17, 2003, 1:20pm
4
You’re welcome, Nasih. =)