I'm trying to find code that has a search bar roll over effect such as HULU and YouTube.

Hello

The seekbar roll more will not show just the NetStream.time but also has turned the screen images.  I searched several sites, but no clear answer yet.

I use actionscript 3 in FLash CC and can also use Flash Builder.

Thank you

Please find below the code-

(1) use your real variable rather than a model.

(2) position of thumbnails should be move according to the mouseMove on seekBar. Get the posion mouse X and set the xpos of the nail of the thumb that contain either holder video display object or image.

package {}

import flash.display.MovieClip;

import flash.events.MouseEvent;

import flash.events.TimerEvent;

Import org.osmf.events.TimeEvent;

import flash.utils.Timer;

to import flash.net.NetStream;

SerializableAttribute public class SeekThumb extends MovieClip {}

private var seekBtn:MovieClip;

private var getVideoFrameAtSecond:Number = - 1;

private var durationOfVideo:Number = 100 / / assumes that we have video 100 seconds

private var: timer;

private var counter: Number = 0;

private var delay: Number = 1;  It can be updated according to the sweetness.

private var netStream:NetStream;

private var lastSeekPos:Number;

public void SeekThumb() {}

the constructor code

this.addChild (createSeekButton ());

Timer = new Timer (200);

timer.addEventListener (TimerEvent.TIMER, updateQos);

delay = counter;

}

private void createSeekButton (): MovieClip {}

seekBtn = new SeekButton();

seekBtn.buttonMode = true;

seekBtn.addEventListener (MouseEvent.MOUSE_MOVE, seekMouseMove, false, 0, true);

seekBtn.addEventListener (MouseEvent.ROLL_OVER, seekOver, false, 0, true);

seekBtn.addEventListener (MouseEvent.ROLL_OUT, seekOut, false, 0, true);

seekBtn.x = 50;

seekBtn.y = 100;

Return seekBtn;

}

private void seekOver(event:MouseEvent):void {}

Timer.Start ();

}

private void seekOut(event:MouseEvent):void {}

Timer.Stop ();

}

private void updateQos(event:TimerEvent):void {}

trace ("counter =" + counter)

{if(Counter>0)}

-counter;

} else {}

Check funtion below according to your need.

updateVideoFrame (getVideoFrameAtSecond);

addImageOfVideoFramesAt (getVideoFrameAtSecond); / / If you want to show your bitmap image and then pass the image bitmap here parameters or customize your methods here

trace (getVideoFrameAtSecond);

}

}

private void addImageOfVideoFramesAt(seekTime:Number):void {}

var getBitmapMovie:MovieClip = myStoredThumbArray [seekTime] / / find the url to the image here of the table that you have already stored / traces of main image source you provided.

previewHolder.addChild (getBitmapMovie);

}

private void updateVideoFrame(setId:Number):void {}

try {}

If (netStream! = null & lastSeekPos! = setId) {}

lastSeekPos = setId;

netStream.play (netStreamURL, setId);

netStream.pause ();

netStream.soundTransform = setVoluem to 0

}

} catch (error: Error) {}

trace ("UpdateVideo sampling error:" + error);

}

}

private void seekMouseMove(event:MouseEvent):void {}

var currentMc:MovieClip = MovieClip (event.currentTarget);

getVideoFrameAtSecond = Math.round(currentMc.mouseX*durationOfVideo/seekBtn.width;)

delay = counter;

}

}

}

Tags: Flash Player

Similar Questions

Maybe you are looking for