for the code given below i get the following error:
Error #2044: Unhandled NetStatusEvent:. level=error, code=NetStream.Play.StreamNotFound
at PDFReader/init()[C:\flexiblerails\current\PDFReader\app\flex\PDFReader.mxml:26]
at
PDFReader/___PDFReader_WindowedApplication1_creationComplete()[C:\flexiblerails\current\PDFReader\app\flex\PDFReader.mxml:7]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:9051]
at mx.core::UIComponent/set initialized()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:1167]
at
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:698]
at Function/
http://adobe.com/AS3/2006/builtin::apply()
at mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8460]
at mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8403]
=====================================================================================================================================
bt for the following code i can see a video display component alone with no flv file being displayed.
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="
http://www.adobe.com/2006/mxml" layout="absolute" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#FBFAFC, #F3F3F4]">
<mx:Script>
<![CDATA[
import flash.filesystem.File;
import mx.events.FileEvent;
/*****************************
Create a file object and point it to documentsDirectory.
It is the My Documents directory in case of Windows and
Documents subdirectory of the user directory in case of Mac OS.
******************************/
private var file:File = File.documentsDirectory;
/*****************************
browseForOpen method opens up a browse directory dialog
box to open a file from My Documents directory
(Documents directory in case of Mac OS) for file browsing
and upon selection of a file onSelect method is called.
******************************/
private function fileOpen():void {
file.browseForOpen("Select a file");
file.addEventListener(Event.SELECT, onSelect);
}
/**********************************
onSelect method assigns the url property of the file object to the
variable vUrl and the name property to the variable vName as a string.
**********************************/
[Bindable]
private var vUrl:String;
[Bindable]
private var vName:String;
private function onSelect(event:Event):void {
vUrl = file.url;
vName =
file.name;
myVideo.play();
timer.visible=true
}
private function closeVid():void {
myVideo.stop();
timer.visible=false;
vidName.visible=false;
}
]]>
</mx:Script>
<mx:VideoDisplay x="70" y="26" width="379" height="234" id="myVideo" source="{vUrl}"/>
<mx:Button click="fileOpen()" label="Open" x="70" y="289"/>
<mx:Button x="134" y="289" label="Close" click="closeVid()"/>
<mx:Label x="90" y="10" text="{vName}" id="vidName" fontSize="10" fontWeight="bold" color="#0E5B87"/>
<mx:Label x="210" y="291" id="timer" text="{myVideo.playheadTime}/{myVideo.totalTime}" visible="false"/>
</mx:WindowedApplication>
thanks in advance