First off I want to thank you for taking the time out of your day to help me.
I'm a super noob with Flash but have been tasked with something fairly simple (in theory) by my company.
Basically, I have a video that is to be scrubbed back and forth from frame one till the end of the video using Flash player on a computer with a Spinner device as the user input device. For those of you not familiar, a spinner is basically a device connected via usb that only utilizes a mouse's y axis movement. It's not equivalent to a mouse's scroll wheel however (that's how I thought it worked at first), just the mouse's y axis movement. There are no buttons that can be depressed on this thing by the way.
I have scoured the web for hours but unfortunately I don't even know how to word anything to look for a proper tutorial. I found plenty of things that teach you how to make a scroll bar that one can click and drag, but I'm just looking to control the scrubbing through the mouse movement alone. Is this even possible?
Thanks in advance for your help!!!
PS. I am using Flash CS3 and would like to use AS3
Yes you can do, but maybe a little laborious.
It occurs to me to do two things with the class timer, to launch a counter each time the mouse stops (how it works with tooltips) and then a cursor speed meter, which with another timer and mouse position obtains a speed and if a limit is less than or greater makes the scroll
or putting buttons instead of being pressed, the mouse must be a minimum time to activate and remain active while the cursor is over
To scrub frame to frame you're going to need to put that video directly on the timeline. If you tried to use something like FLVPlayback it would only be able to seek() to keyframes. Adding the video directly to the timeline will get around this.
Essentially you want to listen for movement of the mouse on the y axis. It occurs to me the spinner probably won't affect the actual cursors position which is the event you'd listen for with a normal mouse. That isn't to say you can't try listening for mouse events to test if Flash can read it.
Before going forward, open a new AS3 document and click on frame 1 and open the Actions panel. Paste in this code, test the movie (CTRL/CMD+SHIFT+ENTER) and then play with the spinner and see if you see any output:
stage.addEventListener(MouseEvent.MOUSE_MOVE, handleMouseMove, false, 0, true);
trace("Mouse moved: " + e.stageY);
If you're lucky you'll see some sort of value you can use. If you do, give us an example of that output and we'll proceed from there.