FLVPlayback Seek Bar

I am having trouble getting the seek bar to work with cue
points on the FLVplayback component. I was able to set up slide cue
points using the following code and the slides change when the
video plays. But when I drag the seek bar forward or backward the
slides do not change.
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
_level0.currentSlideName = eventObject.info.name;
_level0.Presentation.gotoSlide(eval(_level0.curren
tSlideName));
_level0.Presentation.eval(_level0.currentSlideName
).gotoAndPlay(1);
display.addEventListener("cuePoint", listenerObject);
Also is there some way to get the FLVplayback component to
work with slide cue points without using the above addEventListener
code? Previously I used the Flash 7 MediaDisplay and MediaPlayback
components and only needed to add the following code on loading of
the component but it does not work with the flash 8 FLVplayback
component: mx.controls.streamingmedia.behaviors.SlideCuePoint
Listener.initializeListener(this, this._parent);

In addition to where you instanciate the flvplayback instance
where ever you have load(your_video_url) or
play(your_video_url)
you need to re define
video_player.seekBar = _seekbar;
video_player.volumeBar = _volume;
video_player.bufferingBar = _bufferbar;
video_player.playPauseButton = _playpausebutton;
video_player.muteButton = _mutebutton;
video_player.fullScreenButton = _fullscreenbutton;
In my case my instance of the flvplayback is in another class
so Rob's solution of a get function in that class works.
The main point here is to re-define them within the function
that gives the url to the flvplayback instance.

Similar Messages

  • DVR w/ FLVPlayback 2.5.0.15 & Custom Publishing Client - Seek Bar Not Working [updated]

    [ UPDATED to include code and modified language after I discovered that everything works when I use Live Encoder.... ]
    Hello.
    So I've got the DVRCast application installed, and I am successfully streaming live-DVR content to the updated FLVPlayback component.  I'm able to access the DVR-specific metadata (e.g. "currLen") without any trouble, and so forth.
    When I record with the Flash Live Encoder, everything works correctly; the seek bar fills in as more content is published, and the playhead advances slowly across the filled-in section of the seek bar.
    But when I do the publishing with a custom client instead of Flash Live Encoder, the seek bar doesn't work right.  Specifically, when I start viewing a stream which is still being broadcast live, the seek bar shows the length of the stream at the moment I started viewing it; however, the seek bar doesn't update correctly as new content continues to be appended to the end of the stream.  What happens instead is that the "playhead" (not sure of the proper terminology here) moves along the seek bar until it reaches the end, and then it just sits at the end -- and the seek bar itself starts expanding to the right, off the edge of the stage!
    So I assume the problem here is that I need to add some code to the publishing client.  Here's the meat of the publishing code (from MyDVRPublish.as, which is the document class for MyDVRPublish.fla):
            public function MyDVRPublish()
                nc = new NetConnection();
                nc.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
                nc.connect("rtmp://localhost/DVRCast");
                dvrFlag = true;
                isVideoReady = false;
                streamID = null;
                vid = new Video(640, 480);
                vid.x = 0;
                vid.y = 0;
                vidMonitor.addChild(vid);
                cam = Camera.getCamera();
                cam.setQuality(0,90);
                cam.setMode(640, 480, 30);
                vid.attachCamera(cam);
            private function onNetStatus(event:NetStatusEvent):void{
                trace(event.info.code);
                if(event.info.code == "NetConnection.Connect.Success"){
                    doRecording("mystream");
            private function doRecording(sID:String) {
                isRecording = true;
                streamID = sID;
                publishCamera();
            private function stopRecording() {
                ns.close();
                isRecording = false;
                trace("Finished recording " + streamID);
            private function onAsyncError(event:AsyncErrorEvent):void{
                    trace(event.text);
            private function publishCamera() {
                ns = new NetStream(nc);
                ns.client = new CustomClient();
                ns.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
                ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onAsyncError);
                ns.attachCamera(cam);
                trace("Publishing Stream...");
                ns.publish(streamID, "record");
    ...What am I missing?
    Thanks,
    -dan
    Message was edited by DanMITRE.

    Hi Dan,
    Unfortunately, I don't know of a tutorial that builds a custom client that publishes to DVRCast, but Graeme Bull created a great video tutorial that should help:
    http://fmsguru.com/showtutorial.cfm?tutorialID=25
    Before Adobe published the DVRCast app, Graeme played around with FMLE3 and figured out what calls it was making to the server and built his own DVRCast app. I know this is the inverse of what you want to do, but watching him reverse engineer FMLE's calls to the server will show you how to make your own publishing client.
    Also, you check out the DVRCast code at rootinstall\applications\dvrcast_origin\scripts to see exactly what the DVRCast app expects the publishing client to call (and what it expects the subscribing client to call).
    Roughly:
    The DVRCast docs have a code example on page 11 that calls DVRSetStreamInfo. After the publisher calls DVRSetStreamInfo with the name of the DVR stream and calls NetStream.publish("streamname", "record"|"append"), the subscribing client calls DVRGetStreamInfo to get the name of the DVRStream. The subscribing client then passes the name of the DVRStream in a call to DVRSubscribe. Finally, the subscribing client calls NetStream.play("streamname", 0, -1) to play the stream.
    I'll get a tutorial up as soon as I can (unless someone beats me to it), but unfortunately I have to hit some deadlines today on other projects.
    HTH,
    Jody

  • Custom seek bar / scrubber NOT using component

    Apparently you can't access the handle in the SeekBar
    component:
    _level0.seekBarHandle.onPress = function()
    trace ("handle!");
    this is the instance name that is displayed in the debugger
    but there's no way to connect another function to it...
    does anyone know how create a seek bar / progress bar /
    scrubber with movie clips/action script instead of a
    component?

    That's what I did but I can't apply a function to the seek
    bar handle...
    _level0.seekBarHandle.onPress = function()
    trace("handle");
    it's not the design element that I'm concerned with it's
    attaching a function the that darn handle.
    That's why I am interested in creating my own component or
    movie clips that control the FLVPlayback component.

  • Zshare streaming: Seek bar doesn't fully work

    When occasionally watching a zshare stream (dislike downloading, takes too long, rather wait a few minutes and then start watching the stream), the stream loads just fine, I can click on the seek bar to make it start from a different position, and it can do this just great.
    The video can stream, and it can save itself temporarily for me to watch when I'm comfortable.
    The problem I'm having is, I simply can't click the seek bar unless I want to scrap all the data downloaded so far. Clicking on the seek bar (even if the video is fully loaded) will reset all data and start restreaming all over again.
    Is this a firefox problem? Zshare simply doesn't allow this function, even though giving me a seek bar makes me assume it does support it...
    Megavideo, Youtube, Veoh and many other video streaming services have a fully functioning streaming feature. Zshare simply won't work...
    Any help is appreciated.
    == This happened ==
    Every time Firefox opened
    == watching any Zshare videos

    Same here and got no clue what's causing it

  • Seek bar for music

    Hi!
    I know flash has seek bar component for flv videos but I'm
    streaming music from net. I have a code for loading entire song but
    is it possible to add a seek bar to show what part of song is
    playing

    Yes, if you just want to track the progress of the sound
    file's playing, its pretty simple. You'll need a couple of
    variables, one to hold the value of the sound file's duration. And
    another to define the width of the seek bar object.
    In your download complete function give the duration variable
    the value of the sound's duration property. Then assign an
    enterframe function to update the seek bar. Just take the
    soundChannel.position property value and divide it by the sound
    file's duration property value. This will give you a ratio of the
    current position relative to the total time. Then multiply that
    value by the total width of the seek bar. Position the marker at
    that point on the seek bar.

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

    Hi
    The seekbar roll over will not just show the NetStream.time but also has the frames screen shot.  I've searched several sites but no clear answer yet.
    I'm using actionscript 3 in FLash CC and can also use Flash Builder.
    Thanks

    Please find the below code -
    1) Use your actual variable instead of dummy.
    2) Position of thumbnails should be move as per mouseMove on seekBar. Get the mouse X posion and set the xpos of your thumbnail which contain either Video object or image display holder.
    package  {
      import flash.display.MovieClip;
      import flash.events.MouseEvent;
      import flash.events.TimerEvent;
      import org.osmf.events.TimeEvent;
      import flash.utils.Timer;
      import flash.net.NetStream;
      public class SeekThumb extends MovieClip {
      private var seekBtn:MovieClip;
      private var getVideoFrameAtSecond:Number = -1;
      private var durationOfVideo:Number = 100// Asume that we have 100 seconds video
      private var timer:Timer;
      private var counter:Number = 0;
      private var delay:Number = 1;  // It can be updated as per smoothness.
      private var netStream:NetStream;
      private var lastSeekPos:Number;
      public function SeekThumb() {
      // constructor code
      this.addChild(createSeekButton());
      timer = new Timer(200);
      timer.addEventListener(TimerEvent.TIMER, updateQos);
      counter = delay;
      private function 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 function seekOver(event:MouseEvent):void{
      timer.start();
      private function seekOut(event:MouseEvent):void{
      timer.stop();
      private function updateQos(event:TimerEvent):void{
      //trace("counter = "+counter)
      if(counter>0){
      counter--;
      }else{
      // Enable below funtion as per your need.
      //updateVideoFrame(getVideoFrameAtSecond);
      //addImageOfVideoFramesAt(getVideoFrameAtSecond);// If you want to show your bitmap image then pass the bitmap image params here or customize your methods here
      trace(getVideoFrameAtSecond);
      private function addImageOfVideoFramesAt(seekTime:Number):void{
      var getBitmapMovie:MovieClip = myStoredThumbArray[seekTime]// Set the image url here from array which you have already stored/ traced from main source of image which you provided.
      previewHolder.addChild(getBitmapMovie);
      private function 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 Frame Error: "+error);
      private function seekMouseMove(event:MouseEvent):void{
      var currentMc:MovieClip = MovieClip(event.currentTarget);
      getVideoFrameAtSecond = Math.round(currentMc.mouseX*durationOfVideo/seekBtn.width);
      counter = delay;
    Re: How to show video frames as still preview image when roll over on seek bar just like Hulu? 

  • FLV player seek bar

    this may be a really dumb question, but this is all new to
    me. Show a noob some sympathy.
    I've created a FLV with On2, and used the insert Flash Video
    command in Dreamweaver 8. the video plays well, the skin shows up,
    but there is no visible progress being recorded in the seek bar.
    Meaning, there's no bar that grows longer as more of the video is
    downloaded. The playhead moves along well, and I can scrub across
    the video that has been downloaded, but I can't see how much of the
    file has been downloaded. I just have to guess.
    How can I remedy this problem? is it actionScript? adding a
    parameter? Do I need to do it in Flash or can it be done in
    Dreamweaver?
    I've been searching for solutions to no avail, so any help
    would be greatly appreciated.
    thanks,
    JP

    Hi
    There is an answer to this problem, but as you posted your question in answer to someone else's question!! (try posting a question on the flash forum).
    PZ

  • Seek Bar Component Flash CS5

    Hi, I've been trying to use the seek bar component in Flash CS5.
    I've managed to use create my own play and pause buttons using the following code:
    playbtn.addEventListener(MouseEvent.CLICK, fl_ClickToPlayVideo);
    function fl_ClickToPlayVideo(event:MouseEvent):void
              // Replace video_instance_name with the instance name of the video component
              video.play();
    pausebtn.addEventListener(MouseEvent.CLICK, fl_ClickToPauseVideo);
    function fl_ClickToPauseVideo(event:MouseEvent):void
              // Replace video_instance_name with the instance name of the video component
              video.pause();
    I've dragged the SeekBar component onto the stage and given it an instance name of "mySeekBar".
    I have then referenced this in the Actionscript as follows:
    video.seekBar = mySeekBar;
    However, the seek bar doesn't work. It displays but there is no slider etc.
    Can anyone help me out as I have very little knowledge of Actionscript!
    Thanks.

    Hi, couldn't quite get everything in two screenshots:
    1. FLV & properties:
    http://gyazo.com/df0848ed58e3b86c15a9f3ea51cd13c0
    2. Seekbar selected & properties
    http://gyazo.com/c54da21cfc29727f2ea0a38f5d794926
    3. Actionscript in "Actions" layer
    http://gyazo.com/92bd65d25dff0c027a04bd3f1b62542a
    Thanks.

  • Seek Bar does not work in720???

    Hi,
    I am using Lumia 720 for the past 15 days. I watched some of the videos on Youtube. 
    However, one problem I noticed is that, if I want to forward/rewind the vedio using seek bar, simply it does not work!
    May I know how I can solve this problem?
    Please suggest.
    Regards,
    Syed

    Thanks, cor-el, but I don't know how to start Firefox in Safe Mode, whatever that means. Besides, I finally gave up and uninstalled Firefox 6. Now I'm using Internet Explorer because I couldn't find a place where I could download Firefox 5, the version I wish I had kept but my AVG Safe Search 10.0.0.1390 wouldn't work with us so I upgraded to FF6.
    Do you know the url for where I can reinstall version 5?

  • Play only part of a video and set seek bar accordingly

    Is there a way to load and play clips from a larger video with FLVplayback in Flash CC AS3?
    For example, if my flv video is 5 minutes long and has 10 cuepoints, how do I play only from cuepoint x to cuepoint y?
    ALSO, I would like the seekbar handle to go to 0% at cuepoint x, and at 100% rest at cuepoint y. This way, the user can only seek through the current clip.
    This will let me load the video one time, and then use different parts of it as needed.
    I thought I had found a reference to flvplayback play() method that had a start parameter, but could not find examples.
    System: Windows 7, Adobe CC.
    Thanks.

    you can use the seek method to start play from cp x.  unless you're using a streaming server likefms or redhat, you must wait until the video has loaded up to cp x.
    you can use a cp listener to check when cp y has been reached.
    you can control the seekbar if you make your own.  ie, you can't use the flvplayback seekbar.

  • Volume and seek bar handles missing from video player...

    I am creating a custom flash video player for my friend's wife's surprise 40th birthday party. I was progressing through and everything was working fine, but now the seekbar and volume bar handles are completely gone. I was working on doing some buttons to load each video segment when I realized the missing handles. My actionscript is below:
    import fl.video.*;
    var flvPlayer:FLVPlayback = new FLVPlayback();
    addChild(flvPlayer);
    flvPlayer.playButton = playbtn; 
    flvPlayer.pauseButton = pausebtn;
    flvPlayer.seekBar = seekbar;
    flvPlayer.x=78;
    flvPlayer.y=39;
    flvPlayer.width=640;
    flvPlayer.height=360;
    flvPlayer.source = "flv/video1.f4v";
    vid1.addEventListener(MouseEvent.CLICK, fl_ClickToSetSource1);
    function fl_ClickToSetSource1(event:MouseEvent):void
    flvPlayer.source = "flv/video1.f4v";
    vid2.addEventListener(MouseEvent.CLICK, fl_ClickToSetSource2);
    function fl_ClickToSetSource2(event:MouseEvent):void
    flvPlayer.source = "flv/video2.f4v";
    The play/pause buttons work perfectly, so I'm at a loss what is going on...any ideas would be most appreciated.
    P.S. Take it easy on my code....I'm not the most proficient.

    Ok BE...I took you advice and used a prebuilt skin, but tweeked it to get it looking how I wanted. However, now when I switch between the different videos, the playhead stays at the spot that it previously was. For example, if the playhead is currently 50% through video #1 and I click video #2, the playhead is still sitting at 50%. How would I reset the playhead to the beginning of the new video?
    import fl.video.*;
    var flvPlayer:FLVPlayback = new FLVPlayback();
    addChild(flvPlayer);
    flvPlayer.skin = "MySkin.swf";
    flvPlayer.skinAutoHide = true;
    flvPlayer.skinFadeTime = 300;
    flvPlayer.x=78;
    flvPlayer.y=89;
    flvPlayer.width=640;
    flvPlayer.height=360;
    flvPlayer.source = "flv/Video1.f4v";
    vid1.addEventListener(MouseEvent.CLICK, fl_ClickToSetSource1);
    function fl_ClickToSetSource1(event:MouseEvent):void
    flvPlayer.source = "flv/Video1.f4v";
    vid2.addEventListener(MouseEvent.CLICK, fl_ClickToSetSource2);
    function fl_ClickToSetSource2(event:MouseEvent):void
    flvPlayer.source = "flv/Video2.f4v";
    I know I need to do something in the setSource function, but don't know how.
    Thanks.
    Mike

  • Hiding the FLVPlayback control bar

    I have a FLVPlayback on my stage, but I want to use my own controls rather than the ones provided by the skin.
    I read that I can make my own skin - but have not been successful.
    Any pointers as to how to do it?

    I found what I needed.
    On the stage, select my FLVPlayback instance.
    Then, Window|Component Inspector.
    In the Component Inspector, select the Skins property and then select the "None" item in the drop-down list.
    Perfect.

  • FLVPlayback.seek() fails for longer seek times

    I'm loading an flv from an rtmp server, and I can't
    successfully seek beyond 20s into the video. The AS is shown below.
    The audio portion of the flv seems to advance just fine; the video
    does not work properly. Any suggestions??!! Many thanks in advance.
    --Brett

    Ah, well, the flv file is somehow corrupt. seek() seems to
    work fine on any other flv I throw at it. I'll leave this inane
    post in the event that some other poor sap encounters something
    similar...

  • Seek and flvPlayback - what's wrong with this please?

    Hi,
    I'm trying to build a player where there's a button that pause the video and then moves the video forward by one second. I am using the following:
    flvPlayback.pause();           
    var newTime = flvPlayback.playheadTime + 1;          
    var currentTime = timeToString(newTime);           
    var endTime = timeToString(flvPlayback.totalTime);         
    progressLabel.text =  currentTime + " / " + endTime;           
    percentLabel.text = Math.round(currentTime/endTime) + "%";           
    flvPlayback.seek(newTime);
    This works for the progressLabel and percentLabel but the video itself does not move to the specified point. Only when I hit play does the video scrub to the right point - can someone help please?

    Thanks for that - but is there anyway to have the player paused instead of playing automatically?
    I tried to use this (where pausePlayback is just a flvPlayback.pause function) but it didn't work:
                flvPlayback.pause();
                var newTime = flvPlayback.playheadTime + 1;
                var currentTime = timeToString(newTime);
                var endTime = timeToString(flvPlayback.totalTime);
                progressLabel.text =  currentTime + " / " + endTime; percentLabel.text = Math.round(currentTime/endTime) + "%";
                flvPlayback.seek(newTime);
                var timer:Timer = new Timer(40, 1);
                timer.addEventListener(TimerEvent.TIMER_COMPLETE, pausePlayback);
                timer.start();
                flvPlayback.play();

  • FLVPlayback invalid seek

    Newbie here.
    I'm sure that someone has come across this before, at least
    I'm hoping. I'm using Flash Player 9, ActionScript 3.0 and I'm
    bringing in a list of video clips via an XML object. Everything is
    working... but... I'm getting the following:
    VideoError: 1003: Invalid seek
    at fl.video::VideoPlayer/seek()
    at fl.video::FLVPlayback/seek()
    at fl.video::FLVPlayback/seekToNextNavCuePoint()
    at fl.video::UIManager/
    http://www.adobe.com/2007/flash/flvplayback/internal::dispatchMessage()
    at fl.video::UIManager/
    http://www.adobe.com/2007/flash/flvplayback/internal::handleButtonEvent()
    I then can either click on the "Dismiss All" or "Continue"
    button. Since this does NOT cause the next video to NOT play, is
    there anyway I can force ActionScript 3.0 to ignore this? Or is
    there something that I should be doing that would prevent this from
    happening in the first place?
    Thanks in advance to everyone... I'm at my wit's end!

    Hi,
    You can use the cue point that is added either via action script or via adobe media encoder. Just go through http://cloudnebula.blogspot.com/2010/01/working-with-as3-video-cuepoints.html that may be of help to you
    Thanks!
    ps: pls mark this post as answered if this of help to you

Maybe you are looking for

  • Inspiron 20 3000 can I add a solid state drive to boot for speed ?

    I'm looking to purchase an inspiron 20 3000. I asked sales if I could get it configured with an SSD drive, and they said no. I'd have to purchase it and then the drive myself. But on Dell's web site I don't see any SSD drives, or hybrids listed as co

  • ISE EAP-Chaining with machine, certificate and domain credentials

    Good morning, A customer wants to do the following for their corporate wireless users (all clients will be customer assets): Corp. wireless to authenticate with 2-factor authentication: •1. Certificate •2. Machine auth thru AD •3. Domain creds When c

  • Seemingly Redundant File in PSE11 Documents

    I notice a file called Adobe Photoshop Elements 11 which, when opened, reveals 2 folders: one named PSE11 which, upon opening, reveals a string of files called Setup1, Setup2, Data2, Data1, PSE11 Installer Package, Elements Installer and Elements Org

  • Lightroom 5 does not detect my camera, a Nikon D600, in tethered capture. Can someone assist?

    Lightroom 5 does not detect my Nikon D600 in tethered capture. I have tried turning the camera off then on and also turned the computer off then on.  I am using windows 7.  Anyone have any ideas?

  • BT Mail Sessions

    Is anyone else logging into their email clicking on a email to reply and then getting "Your session has expired. Please log in again to continue." Doesn't matter what you do just get that error.