A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Flv CuePoints and inValidTime

  1. #1
    Senior Member
    Join Date
    Apr 2001
    Location
    UK
    Posts
    493

    Flv CuePoints and inValidTime

    Posted this on the Video forum and as no responses trying here too.

    Problem (F8 on2 VP6 encoded video):

    Video streaming and want to jump to cuePoint that hasnt yet loaded. Onstatus returned object returns the NetStream.Seek.inValidTime message and then proceeds to give a Notify (seek successful..which it hasnt been) and Stop message...which obviously stops the flv playing. I dont want this to happen and cant see a way of preventing it! I just want it to capture the error and return a message to the user (whihc is easy) and allow the Video to continue playing ...which doesnt seem obvious

    I have searched these forums and found various NetStream.seek() issues but non relating to this

    CODE:
    Code:
    var connection_nc:NetConnection = new NetConnection();
    connection_nc.connect(null);
    var stream_ns:NetStream = new NetStream(connection_nc);
    my_video.attachVideo(stream_ns);
    
    stream_ns.play("video1.flv");
    
    stream_ns.onStatus = function(infoObject:Object) {
    
            trace("NetStream.onStatus called: ("+getTimer()+" ms)");
    		trace("infoObject['code']:"+infoObject["code"])
    		
            /*
            for (var prop in infoObject) {
                trace("\t"+prop+":\t"+infoObject[prop]);
            }
            trace("");
           */
    		if (infoObject["code"] == "NetStream.Seek.InvalidTime")
    		{
    			trace("not loaded yet")
    			trace("last Valid:"+infoObject.message.details)
    			//stream_ns.pause()
    			
    		}
    
    };
    
    
    onMouseDown=function()
    {
         stream_ns.seek(40)
    }
    
    
    stop()
    Any help appreciated as this doesnt seem to be documented anywhere!!

    Cheers
    Jon

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Put this in:

    PHP Code:
    if (infoObject.code == "NetStream.Seek.InvalidTime")
        {
            var 
    myTimer:Number this.time;
            
    trace ("not loaded yet");
            
    this.play ("video1.flv");
            
    this.seek (myTimer);
        } 
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Please delete your thread in the video section and give a reason.

    Thanks.
    - The right of the People to create Flash movies shall not be infringed. -

  4. #4
    Senior Member
    Join Date
    Apr 2001
    Location
    UK
    Posts
    493
    thanks for getting back

    Been getting myself all worked up about this for some reason and i had it sorted anyway!!! Working locally isnt the best way to test streaming video!!!

    Thanks for the code though as it tidies what i was working on.


    Real "Supid Idiot" moment!

    Thanks
    JOn

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center