dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: FLVPlayback Component troubles

  1. #1
    Junior Member
    Join Date
    Dec 2001
    Posts
    2

    FLVPlayback Component troubles

    I have been trying to play multiple .flv by ising a playlist or even through the FLVPlayback Component Behaviors or via .xml or smil file.

    I can get the player to play a single video but not work with .xml nor evein in Flash's preset behavior file lists. I have followed thier tutoral several times and the videos will not play (http://www.macromedia.com/devnet/fla...aviors_05.html)

    Would anyone have a complete example of this playback script or even a smil file that streams one clip and then the next and so on.

    This is the code I have been using for the AS:

    PHP Code:
    on (buffering) {

        
    // Set Videos Behavior
        
        // Create a videos object to hold a video
        // playlist and event handler functions...
        
    var videos:Object = new Object();
        
        
    // Set up to 7 video feeds in a single component
        
    videos.list = new Array();
        
    videos.list[0] = "streams/DaveAugie_001.flv";
        
    videos.list[1] = "streams/DaveAugie_002.flv";
        
    videos.list[2] = "";
        
    videos.list[3] = "";
        
    videos.list[4] = "";
        
    videos.list[5] = "";
        
    videos.list[6] = "";
        
    videos.loop false;
        
    videos.length 1;
        
    videos.loaded false;
        
        
    // Path to FLVPlayback components
        
    var this.myVideo;
        
        
    // Set the path of the first video feed
        
    m.contentPath videos.list[0];
        
        
    // Set a 'ready' event handler to load the videos
        
    videos.ready = function( evt:Object ):Void
        
    {
            if(!
    this.loaded){
                
    this.loaded true;
                for( var 
    n=1n<this.list.lengthn++ ){
                    if( 
    videos.list[n].indexOf(".flv") != -){
                        
    m.activeVideoPlayerIndex n;
                        
    m.contentPath videos.list[n];
                        
    this.length++;
                    }
                }
                
    m.activeVideoPlayerIndex 0;
            }
        }
        
    m.addEventListener("ready",videos);
        
        
    // Set a 'complete' event handler to load the next video
        
    videos.complete = function( evt:Object ):Void
        
    {
            var 
    nextIndex Number(evt.vp)+1;
            if( 
    nextIndex == this.length){
                if( 
    this.loop ){
                    
    nextIndex 0;
                }else{
                    return;
                }
            }
            
    m.activeVideoPlayerIndex nextIndex;
            
    m.visibleVideoPlayerIndex nextIndex;
            
    m.play();
        }
        
    m.addEventListener("complete",videos);
        
        
    // End Set Videos Behavior


        // Stop and Reset Behavior
        
        
    this.myVideo.autoRewind true;
        
    this.myVideo.stop();
        
        
    // End Stop and Reset Behavior
                
        // Start Toggle Play/Pause Behavior
        
        
    var this.myVideo;
        if(!
    m.playing)
        {
            if(
    Math.round(m.playheadTime) == m.totalTime)
                
    m.stop();
            
    m.play();
        }else{
            
    m.pause();
        }
        
        
    // End Toggle Play/Pause Behavior

        // Set Video Index Behavior
        
        
    this.myVideo.stop();
        
    this.myVideo.activeVideoPlayerIndex 0;
        
    this.myVideo.visibleVideoPlayerIndex 0;
        
    this.myVideo.play();
        
        
    // End Set Video Index Behavior

    Smil file

    HTML Code:
    <smil>
        <head>
            <layout>
                <root-layout width="720" height="480" />
            </layout>
        </head>
        <body>
            <switch>
                <ref src="streams/DaveAugie_001.flv" dur="7:15.1"/>
                <ref src="streams/DaveAugie_002.flv" dur="6:34.1"/>
            </switch>
        </body>
    </smil>
    xml
    HTML Code:
    <xml>
    	<listitem name="Dave Augie Pt 1" url="DaveAugie_001.flv">
    		<stream name="DaveAugie" start="0" len="-1"/>
    	</listitem>
    
    	<listitem name="Dave Augie Pt 2" url="DaveAugie_002.flv">
    		<stream name="DaveAugie2" start="0" len="-1"/>
    	</listitem>
    	
    	<menu>
    		<listitem name="Dave Augie Pt 1"/>
    		<listitem name="Dave Augie Pt 2"/>
    	</menu>
    </xml>
    I would like at least one of these to work to stream multiple streams.

    here is what I have done so far using the FLVPlayback Component:
    http://www.wirestreamnetwork.com/test/player.html
    Last edited by happycamper; 11-22-2005 at 02:45 PM.

  2. #2
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    Hi sorry cant look though all your code right now, but if you like you download my xml driven accordion video player from www.flashmatics.co.uk/blog and look at the actionscript. You may get some ideas from there
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

  3. #3
    Junior Member
    Join Date
    Dec 2001
    Posts
    2
    Hey thanks that looks like the example I need

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