Hi,
I have a series of 11 pictures, showing a knob turning. I’ve loaded these 11 pictures into 11 frames respectively. What I need to do now is to be able to drag the knob when the mouse is pressed and moved. And whenever the mouse is dragged, the knob will be turned to the next frame, showing the next picture. I hope to achieve a smooth turning knob, just like the one in this website:
http://mysite.wanadoo-members.co.uk/BBGorB/HSGenerator.swf
Here’s my code (the knob does not run smoothly):
on(releaseOutside){
stop();
}
on(press){
var mousePos = _ymouse;
var mousexPos = _xmouse;
}
on(release){
if(_ymouse > mousePos || _xmouse < mousexPos){
nextFrame();
}else{
prevFrame();
}
}
Can someone please help me…
thanks a million.