Video Site Production example four _php tutorial

Source: Internet
Author: User

With the XML list of movies in hand, it's time to create a Flex application This extends the Simplemovie.mxml player with The list of movies. This upgraded Flex application are shown in Listing 7.

Listing 7. Mytube1.mxml

 
 
  
   
  
  
   
Import Mx.rpc.events.resultevent;import Mx.controls.videodisplay;import Mx.controls.list;import Mx.rpc.http.httpservice;import mx.collections.ArrayCollection; [bindable]private var movies:arraycollection = new ArrayCollection ();p ublic function ongetmovies (event:resultevent)  : void{var firstmovie:string = event.result.movies.movie[0].source.tostring ();  Videoplayer.source = Firstmovie;  movies = Event.result.movies.movie; Movielist.selectedindex = 0;}  Public Function onprevious (): void{if (Movielist.selectedindex = = 0) Movielist.selectedindex = movies.length-1;  else Movielist.selectedindex-= 1; Videoplayer.source = This.movieList.selectedItem.source.toString ();}  Public Function Onplay (): void{Videoplayer.source = this.movieList.selectedItem.source.toString (); Videoplayer.play ();} Public Function OnNext (): void{if (Movielist.selectedindex >= (movies.length-1)) Movielist.selectedindex =  0;  else Movielist.selectedindex + = 1; Videoplayer.sourcE = This.movieList.selectedItem.source.toString ();} Public Function OnChange (): void{Videoplayer.source = this.movieList.selectedItem.source.toString ();}
  
  
     
 
        
  
         
  
            
   
             
   
             
   
          
  
         
 
        
 
    

   
  
 

http://www.bkjia.com/PHPjc/632016.html www.bkjia.com true http://www.bkjia.com/PHPjc/632016.html techarticle with the XML list of movies in hand, it's time to create a Flex application that extends the Simplemovie.mxml player W ith the list of movies. This upgraded Flex application is show ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.