Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1807976
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T06:12:15+00:00 2026-05-17T06:12:15+00:00

I have some FLV video files to be reproduced sequentially by a Flash video

  • 0

I have some FLV video files to be reproduced sequentially by a Flash video player. Suppose v1.flv and v2.flv. I want the player to start playing v2.flv once v1.flv has reached the end. According to this forum, the onPlayStatus does not fire in progressive FLVs. What can be done? A snippet of what I am trying below:

public class MyClass extends Sprite {
    private var nc : NetConnection;
    private var ns : NetStream;
    private var vid : Video;
    private var vidURL : String = "v1.flv";

    public function MyClass() {
        var nsClient:Object = {};
        nsClient.onPlayStatus = client_onPlayStatus;

        nc = new NetConnection();
        nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
        nc.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
        nc.connect(null);

        ns = new NetStream(nc);
        ns.play(vidURL);
        ns.client = nsClient;

        vid = new Video();
        vid.attachNetStream(ns);

        addChild(vid);
    }

    private function netStatusHandler(event : NetStatusEvent) : void {
        trace(event.info.code);
        switch(event.info.code) {
            case "NetConnection.Connect.Success":
                trace("Loaded stream: " + vidURL);
                break;
            case "NetStream.Play.StreamNotFound":
                trace("Stream not found: " + vidURL);
                break;
            default:
        }
    }

    private function client_onPlayStatus(event:Object) : void {
        trace("status=" + event.info.code);
    }
}

The only text that shows up in the trace output is:

NetConnection.Connect.Success
Loaded stream: /path/to/v1.flv

Any help will be appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T06:12:15+00:00Added an answer on May 17, 2026 at 6:12 am

    I ended using part of charlie-boy’s suggestion adapting MediaStream.as to check every 100ms if the time property of the NetStream is the same (it’s stuck in the end… or maybe just stuck but my specific situation will make that unlikely).

    I added three properties to MediaStream:

    private var last_time:Number = -1;
    private var last_check:int  = 0;
    private const check_delay:int = 100;
    

    and changed the compareTime function like this:

        private function compareTime():void
        {
            if (isNaN(duration))
            {
                // when there is no metadata duration
                if (getTimer() - last_check > check_delay)
                {
                    // enough time has passed since last check
                    if (last_time==this.time)
                    {
                        timer.stop();
                        timer.removeEventListener(TimerEvent.TIMER, onTimer);
                        dispatchEvent(new StreamEvent(StreamEvent.COMPLETE, null));
                    }
                    else
                    {
                        last_check = getTimer();
                        last_time = this.time;
                    }
                }
            }
            else if(!isNaN(duration) && this.time >= duration)
            {
                timer.removeEventListener(TimerEvent.TIMER, onTimer);
                dispatchEvent(new StreamEvent(StreamEvent.COMPLETE, null));
            }
        }
    

    The worst case scenario is a 100ms “stuck frame” before loading the next clip. Not so bad for my specific need.

    Thanks all for the input.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some FLV video files to be reproduced sequentially by a Flash video
Would it be possible to have a video (MP4, FLV, F4V, or some other
I have been creating a custom video player for the web. On some machines
I want my website to join some webcam recordings in FLV files (like this
I have some files that are uuencoded, and I need to decode them, using
I have some files stored at amazon. all in private mode, and since I
I have a url like http://localhost:8020/stream.flv On request to my php sctipt I want
I have a flv video file. I loaded the binary data of this flv
I have .asf files. All of them have 2 video streams and 1 audio
I have a Flash-file with some ActionScript code that loads an RSS-feed and animates

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.