3 Replies Latest reply on Jul 19, 2010 11:17 PM by ska-man

    Hi some urgent attention help is required.

    Hickies Level 1

      Hi people from all over the place.


      I'm currently working on a project for my school and I was introduced to this particular tutorial :


      http://www.adobe.com/devnet/flashmediaserver/articles/fmis_video_editor_03.html

       

      Piror to that, I'm kinda stuck to the coding area.


      Okay I'll break it down into pieces.


      Where do i actually put in those code on my Flex/Flash builder?

       

      My existing code looks like this :


      <?xml version="1.0" encoding="utf-8"?>

      <s:Application

       

       

      xmlns:fx="http://ns.adobe.com/mxml/2009"

      xmlns:s="

      library://ns.adobe.com/flex/spark"

      xmlns:mx="

      library://ns.adobe.com/flex/mx"

      creationComplete="init()(event)" xmlns:ns1="

      *">

       

       

      <fx:Script>

      <![CDATA[

       

       

      // Initializes the application

       

       

       

      private function init() : void {

       

      videoplayer =

      new FLVPlayback();

       

      var ui:UIComponent = new UIComponent();

       

      this.addElement( ui );

      ui.addChild( videoplayer );

      videoplayer.x=315;

      videoplayer.y=0;

      videoplayer.width = 1280;

      videoplayer.height = 720;

      videoplayer.bufferTime = 0.1;

      videoplayer.skinBackgroundColor = 0x666666;

      videoplayer.skin =

      "SkinUnderPlayStopSeekFullVol.swf";

      videoplayer.scaleMode = VideoScaleMode.MAINTAIN_ASPECT_RATIO;

      videoplayer.skinAutoHide =

      false;

      }

       

      // Event listener for the on-demand source data grid

       

       

      private function sourceGridClick(e:MouseEvent) : void {

      videoplayer.isDVR =

      false;

      videoplayer.isLive =

      false;

      videoplayer.source =

      "rtmp://"+fmsserver+"/editor/mp4:"+sourcegrid.selectedItem;

      isDVR =

      false;

      }

       

       

      // Event listener for the output data grid

       

       

      private function outputGridClick(e:MouseEvent) : void {

      videoplayer.isDVR =

      false;

      videoplayer.isLive =

      false;

      videoplayer.source =

      "rtmp://"+fmsserver+"/editor/mp4:"+outputgrid.selectedItem;

      isDVR =

      false;

      }

       

       

      // Event listener for the live source data grid

       

       

      private function sourceLiveGridClick(e:MouseEvent) : void {

      videoplayer.isDVR =

      true;

      videoplayer.isLive =

      true;

      videoplayer.source =

      "rtmp://"+fmsserver+"/dvrcast_origin/mp4:"+livestreamgrid.selectedItem.name + ".f4v";

      isDVR =

      true;

      }

       

      // Initializes the application

       

       

      private function init() : void

      {

      [...]

      nc =

       

      new NetConnection();

      nc.addEventListener(NetStatusEvent.NET_STATUS,onConnect);

      nc.connect(

      "rtmp://"+fmsserver+"/editor/");

      [...]

      }

       

      // Load the latest list of available source and exported videos

      clips from FMIS

       

       

      private function onConnect(status:Object) : void {

      refreshVideos();

      refreshVideosOutput();

       

      }

       

       

      // Receive a list of the available source clips from the server

       

       

      private function refreshVideos() : void {

      nc.call(

      "getFilesSource", new Responder(onVideoListSource));

      }

      Client.prototype.getFilesSource =

      function() {

       

      var fileList = new File("/streams/_definst_/source");

       

      var temp = fileList.list();

       

      var returnvalue = new Array();

       

      for (var i=0;i<temp.length;i++) {

      returnvalue.push(temp[i].name);

      }

       

      return returnvalue;

      }

       

      // Assign the returned data to the datagrid

       

       

      private function onVideoListSource(thumblist:Array):void{

      movielist =

      new ArrayCollection();

       

      for (var foo:Object in thumblist) {

      thumblist[foo] = thumblist[foo].split(

      "/streams/_definst_/")[1];

      }

      movielist.source = thumblist;

      sourcegrid.dataProvider = movielist;

      nc.call(

      "getLiveStreamId", new Responder(onLiveStreamReceived));

      }

      ]]>

       

      </fx:Script>

      </s:Application>

       

       

       

       

       

       

       

       

       

       

       

      But I'm having some error when I debug it.
      Description Resource Path Location Type
      1084: Syntax error: expecting identifier before tripledot. instant.mxml /export instant/src line 52 Flex Problem
      1084: Syntax error: expecting identifier before tripledot. instant.mxml /export instant/src line 56 Flex Problem
      1084: Syntax error: expecting rightbracket before rightbrace. instant.mxml /export instant/src line 57 Flex Problem
      1084: Syntax error: expecting rightbracket before semicolon. instant.mxml /export instant/src line 53 Flex Problem


      Some serious attention of help would be greatly appreciated.