Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1

Thread: MRSS Flash AS3

  1. #1
    New to the CF scene
    Join Date
    Jan 2010
    Thanked 0 Times in 0 Posts

    Question MRSS Flash AS3



    Hello people

    I'm making a dynamic video player in flash witch should be able to get the videos from mrss.

    The mrss looks like this :

    <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss">
        <title>Channel News</title>
          <description>BBC Motion Gallery is proud to represent China Central Television (CCTV), the acclaimed television network for the People’s Republic of China.
    As the nation’s largest broadcast network, CCTV’s cinematographers have enjoyed unparalleled access and world-class production resources, and the result is a body of work worthy of this magnificent culture.
    Here, in stunning HD-originated (1080/50i) footage as well as standard definition, you will find a wealth of imagery covering locations, people, technology, industry, history and more.
    Travel the Yangtze River from source to sea. Journey the ancient Silk Road. Feel the buzz of Shanghai. Explore the other-worldly landscapes of Xinjiang.
    This is China in all its geographic glory, from unspoiled dramatic landscapes through to its developing neo-cities, its rarely seen rural lifestyles and its most cherished artistic and architectural achievements.</description>
        <media:credit role='author'>PeerTV</media:credit>
        <media:content url=";culture=en_US" type="video/x-ms-asf"/>
        <media:thumbnail url="http://static004.ksoft.tv/staging.peer/uploads/thumbnails/gen_thumb_1404200912455124.jpg" />
          <title>King Lines</title>
          <description>Chris Sharma is the world’s strongest rock climber. At 26 he’s already dominated his sport for the past decade, and he’s just hitting his stride. King Lines documents Sharma’s global quest to find and climb the hardest, most spectacular routes. Off the coast of Mallorca he discovers his most outrageous project yet, a 70 foot arch rising from the Mediterranean Sea...
    The first major climbing film shot entirely in HD, King Lines also represents the first collaboration between the leading producers in the industry - Josh Lowell, of Big UP Productions, and Peter Mortimer, of Sender Films. King Lines is currently touring the country as part of the Reel Rock Film Tour. Footage from the film was featured on NBC’s Jeep World of Adventure Sports, and was honored with a Sports Emmy award for Outstanding Camerawork.</description>
        <media:credit role='author'>PeerTV</media:credit>
        <media:content url=";culture=en_US" type="video/x-ms-asf"/>
        <media:thumbnail url="http://static004.ksoft.tv/staging.peer/uploads/thumbnails/gen_thumb_1404200911401457.jpg" />
          <title>The Macaulay Library</title>
          <description>At the Cornell Lab of Ornithology is a definitive resource for high quality materials on animal behavior. Now shooting in 1080i, our rapidly growing video collection contains clips of thousands of species of birds and other animals. The Library is also home to the world’s largest collection of animal sounds. We provide media to clients for conservation, education, research, and commercial productions.</description>
        <media:credit role='author'>PeerTV</media:credit>
        <media:content url=";culture=en_US" type="video/x-ms-asf"/>
        <media:thumbnail url="http://static004.ksoft.tv/staging.peer/uploads/thumbnails/gen_thumb_1404200911321754.jpg" />
          <description>Enjoy the demo of wildlifeHD, which specializes in capturing spectacular images of wild animals in remote locations. The company works in many of the most distant regions on the planet, and shoots in extreme weather, on and under the water and from the air. Its library includes over 2000 BetaCam tapes of wildlife from all over the world, and its HD library of 1080p (23.98/29.97) and 1080/60i is growing every day.</description>
        <media:credit role='author'>PeerTV</media:credit>
        <media:content url=";culture=en_US" type="video/x-ms-asf"/>
        <media:thumbnail url="http://static004.ksoft.tv/staging.peer/uploads/thumbnails/gen_thumb_1404200911264768.jpg" />
          <description>The new Ducati 1098 Superbike is the most powerful twin-cylinder motorcyle in the world with the highest torque-to-weight ratio of any sport bike. For the first time, Ducati MotoGP and World Superbike technology have been combined to create the world’s premiere street bike.
    The 1098 is a milestone for Ducati — it is the first production bike to feature Brembo Monobloc calipers, an onboard data-logging system and new ‘smart’ technology for the single-sided swingarm. Oval throttle bodies and a the new dashboard are innovations direct from Ducati’s MotoGP effort and appear on a road-going sportbike for the first time ever with the 1098. Simply put, the 1098 has a racing soul.</description>
        <media:credit role='author'>PeerTV</media:credit>
        <media:content url=";culture=en_US" type="video/x-ms-asf"/>
        <media:thumbnail url="http://static004.ksoft.tv/staging.peer/uploads/thumbnails/gen_thumb_1404200911213984.jpg" />
          <description>      Office of the Administrator
            Administrator: Christopher Scolese (Acting)
            Deputy Administrator: Vacant
            Associate Administrator: Christopher Scolese
            Associate Deputy Administrator: Charles H. Scales
            White House Liaison: David Noble
            Assistant Associate Administrator: Christyl Johnson
          Administrator Staff Offices
            Chief, Safety and Mission Assurance: Bryan O'Connor
            Program Analysis and Evaluation: W. Michael Hawes
            Chief Engineer: Michael Ryschkewitsch
            Program and Institutional Integration: Richard Keegan
            Inspector General: Thomas Howard (Acting)
          Mission Directorates
            Aeronautics Research
              Associate Administrator: Jaiwon Shin
            Exploration Systems
              Associate Administrator: Douglas Cooke
              Associate Administrator: Ed Weiler
            Space Operations
              Associate Administrator: William Gerstenmaier
          Mission Support Offices
            Chief Financial Officer: Ronald R. Spoehel
            Chief Information Officer: Bobby German (Acting)
            General Counsel: Michael Wholley
            Innovative Partnerships Program: Douglas Comstock
            External Relations:
             Assistant Administrator: Michael F. O'Brien
            Security and Program Protection:
             Assistant Administrator: Jack Forsythe
            Chief Health and Medical Officer: Richard Williams
            Institutions and Management
              Associate Administrator: Tom Luedtke
                Budget Management and Systems Support:
                  Director: Dennis Bridge
                Diversity and Equal Opportunity:
                  Assistant Administrator: Brenda Manuel
                Headquarters Operations:
                  Executive Director: Chris Jedrey
                Human Capital Management:
                  Assistant Administrator: Toni Dawsey
                  Assistant Administrator: Olga Dominguez
                Internal Controls and Management Systems:
                  Assistant Administrator: Lou Becker
                  Assistant Administrator: Bill McNally
                Small Business Programs:
                  Assistant Administrator: Glenn Delgado
                NASA Shared Services Center:
                  Executive Director: Richard Arbuthnot
            Strategic Communications
              Chief: Mary D. Kerwin (Acting)
                Legislative and Intergovernmental Affairs:
                  Assistant Administrator: Mary D. Kerwin (Acting)
                 Assistant Administrator: Joyce L. Winterton
                Public Affairs:
                  Assistant Administrator: Robert Jacobs (Acting)
                Communications Planning:
                 Director: Kristen Erickson (Acting)
          ›  Organization Chart (16 Kb PDF) (December 2008)
          ›  Other Space Agencies and Related Organizations
        <media:credit role='author'>PeerTV</media:credit>
        <media:content url=";culture=en_US" type="video/x-ms-asf"/>
        <media:thumbnail url="http://static004.ksoft.tv/staging.peer/uploads/thumbnails/gen_thumb_1404200910555080.jpg" />

    Now...I've got a FLVPlayback, TileList and a TextArea component on stage.

    The TileList displays the thumbs and the labels of the videos, the TextArea displays the description of the videos and the FLVPlayback should display the videos (data) from the TileList component.

    Everything is working ok, except the video playing part. I can't get the FLVPlayback component to play the videos. Any help would be great.

    Here is the code :

    bigPlay_mc.addEventListener(MouseEvent.MOUSE_OVER, onBigMouseOver);
    bigPlay_mc.addEventListener(MouseEvent.MOUSE_OUT, onBigMouseOut);
    bigPlay_mc.addEventListener(MouseEvent.CLICK, onBigMouseClick);
    smallPlay_mc.addEventListener(MouseEvent.CLICK, onSmallPlayClick);
    smallPause_mc.addEventListener(MouseEvent.CLICK, onSmallPauseClick);
    smallStop_mc.addEventListener(MouseEvent.CLICK, onSmallStopClick);
    function onBigMouseOver (event:MouseEvent):void
    		bigPlay_mc.scaleX = 1.2;
    		bigPlay_mc.scaleY = 1.2;
    		event.target.buttonMode = true;
    function onBigMouseOut (event:MouseEvent):void
    		bigPlay_mc.scaleX = 1;
    		bigPlay_mc.scaleY = 1;
    function onBigMouseClick (event:MouseEvent):void
    		event.target.visible = false;
    function onSmallPlayClick (event:MouseEvent):void
    		bigPlay_mc.visible = false;
    function onSmallPauseClick (event:MouseEvent):void
    		bigPlay_mc.visible = true;
    function onSmallStopClick (event:MouseEvent):void
    		bigPlay_mc.visible = true;
    var myLoader:URLLoader;
    var myRequest:URLRequest = new URLRequest("http://peer.ksoft.tv/contentcategory/rss/type/rss201/id/1");
    myLoader = new URLLoader (myRequest);
    myLoader.addEventListener(Event.COMPLETE, getRSS);
    function getRSS (event:Event):void
    		var xml:XML = new XML(event.target.data);
    		var il:XMLList = xml.channel.item;
    		var mediaNS:Namespace = xml.namespace("media");
    		for (var i:uint = 0; i < xml.channel.item.length(); i++)
    			var thumburl:XMLList = xml.channel.item[i].mediaNS::thumbnail.@url;
    			var vidurl:XMLList = new XMLList (xml.channel.item[i].mediaNS::content.(@type=="video/x-ms-asf")[0].@url);
    			var link:String = xml.channel.item[i].link;
    			var opis:String = xml.channel.item[i].description;
    			videoList.addItem({label:il.title.text()[i], source:thumburl, data:vidurl, info:opis});
    //Popunjava informaciono polje o kanalu
    videoList.addEventListener (MouseEvent.CLICK, onListClick);
    function onListClick (event:MouseEvent):void
    		channelInfo.text = videoList.selectedItem.info;
    videoList.selectedIndex = 0;
    videoList.direction = "ScrollBarDirection.VERTICAL";
    videoList.columnWidth = videoList.width;
    videoList.rowHeight = 130;
    videoList.width = 167;
    Last edited by Meltbanana; 01-05-2010 at 03:06 PM.


Tags for this Thread

Posting Permissions

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