Video website creation example 4 _ PHP Tutorial

Source: Internet
Author: User
Video website creation Example 4. WiththeXMLlistofmoviesinhand, itstimetocreateaFlexapplicationthatextendsthesimplemovie. mxmlplayerwiththelistofmovies. ThisupgradedFlexapplicationisshow

With the XML list of movies in hand, it's time to create a Flex application that extends the simplemovie. mxml player with the list of movies. this upgraded Flex application is 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();public 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.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/632016.htmlTechArticleWith the XML list of movies in hand, it's time to create a Flex application that extends the simplemovie. mxml player with 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.