0 Replies Latest reply on Mar 6, 2011 10:29 PM by flexy8

    videoDisplay component issues

    flexy8 Level 1

      I'm running on a Win7 and using the trial version of Flash Builder 4. As I do research, my problem seems to be working fine with others. I even tried to make th same sample project on another computer running in trial version Flash Builder 4 but still, the videoDisplay component does not play any video. I Don't know what seems to be the problem when the codes are just so simple and error-free.

       

      <s:WindowedApplication

       

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

      xmlns:s="

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

      xmlns:mx="

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

      applicationComplete="init()"

      >

       

      <s:layout>

       

      <s:BasicLayout/>

       

      </s:layout>

       

       

      <fx:Script>

      <![CDATA[

       

      import mx.core.FlexGlobals;

       

      import mx.events.FlexEvent;

       

      import mx.rpc.events.ResultEvent;

       

      [

      Bindable]

       

      private var ml:XMLList;

       

       

      protected function init():void

      {

      ctrls.send();

      stage.focus =

      this;

      stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;

      }

       

       

      protected function ctrls_resultHandler(event:ResultEvent):void

      {

      ml = XML(event.result).file;

      FlexGlobals.topLevelApplication.addEventListener(KeyboardEvent.KEY_DOWN, loadMovie);

      }

       

       

      private function loadMovie(evt:KeyboardEvent):void {

      preview.source = ml.parent().@location + (ml.(@key == String.fromCharCode(evt.charCode)).@name).toXMLString();

       

      trace(preview.source);

      }

       

      ]]>

       

      </fx:Script>

       

      <fx:Declarations>

       

      <s:HTTPService url="assets/control-settings.xml" id="ctrls"

      result="ctrls_resultHandler(event)"

      resultFormat="

      e4x"/>

       

      </fx:Declarations>

       

       

      <s:VideoDisplay id="preview" width="100%" height="100%" bottom="0"

      autoPlay="

      true"/>

      </s:WindowedApplication>

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

       

      Thanks in advance for the enlightenment.