2 Replies Latest reply on Feb 20, 2009 1:16 PM by dersler

    builiding an flv player in Action script

    dnareshkumar Level 1
      Hello all,
      I have been trying to use fl.flvPlayer class in action script to create an flvplayer but could not find example scripts for the same anywhere. I am working on Flex Builder 3 and have tried to followed the examples given by Adobe for creating a simple player. No success. I figured out fl. extensions wont be loaded by default in Action Script. Can some one tell me the reason. (I have already got a work around for it but isnt the fl extension a default with the Action Script3??).
      Any help or direction required.
        • 1. Re: builiding an flv player in Action script
          Gregory Lafrance Level 6
          How about just using VideoDisplay component?
          • 2. Re: builiding an flv player in Action script
            dersler Level 1
            <?xml version="1.0" encoding="utf-8"?>
            <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"
            backgroundColor="white" viewSourceURL="srcview/index.html">

            import mx.collections.ArrayCollection;
            import mx.events.VideoEvent;

            private var arrColl:ArrayCollection = new ArrayCollection();

            private const VIDEO_URL:String = "name.flv";

            private function videoDisplay_stateChange(evt:VideoEvent):void {
            /* videoDisplay.state == evt.state */
            progressBar.label = evt.state;

            private function button_click(evt:MouseEvent):void {
            /* Reset ArrayCollection object. */
            arrColl = new ArrayCollection();
            /* Set the Canvas container to visible. */
            canvas.visible = true;
            /* If video is currently playing, stop playback. */
            if (videoDisplay.playing) {
            /* Set VideoDisplay control's source property and start
            video playback. */
            videoDisplay.source = VIDEO_URL;

            private function videoDisplay_playheadUpdate(evt:VideoEvent):void {
            progressBar.setProgress(evt.playheadTime, videoDisplay.totalTime);

            <mx:ApplicationControlBar dock="true">
            <mx:Button id="button"
            label="load movie"
            click="button_click(event);" />

            <mx:Canvas id="canvas" visible="false">
            <mx:VideoDisplay id="videoDisplay"
            playheadUpdate="videoDisplay_playheadUpdate(event);" />

            <mx:ProgressBar id="progressBar"
            horizontalCenter="0" />

            <mx:List id="list"
            width="100" />


            copy this code, I did not write
            i'm web page
            paslanmaz boru