[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Control Flash video with mouse

Posted on 2009-06-28
1
Medium Priority
?
388 Views
Last Modified: 2013-11-11
Hi,

I'm not sure if this is possible, but is there a way to control flash video with mouse movement? For instance, if you move the mouse to the right of center over a video, it advances, if you move the mouse to the left of center it rewinds. I guess the functionality I'm looking for would be similar to that of a thumbnail slider.

Another solution could perhaps be, to put frames of the video on separate frames in the timeline, then have the mouse movement advance or rewind the timeline?

I've been researching this quite a bit, but I haven't found any viable solutions. Any help from the experts here would be greatly appreciated!!!

Thanks!
0
Comment
Question by:Coobakai
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 8

Accepted Solution

by:
ccarey earned 2000 total points
ID: 24744145
if you put the video on the timeline in a movieclip (say with an instance name 'mc') then this will do the job:



// mc is present on root timeline
// this code lives on frame 1 of root timeline
 
stage.addEventListener(MouseEvent.MOUSE_MOVE, _onMouseMove, false, 0, true);
 
function _onMouseMove(evt:MouseEvent) : void {
    var pct:Number = Math.max( stage.mouseX / stage.stageWidth, 0);
    var frame:Number = Math.ceil(pct * mc.totalFrames);
    mc.gotoAndStop(frame);
}

Open in new window

0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question