I am trying to load a video using a URL, and I keep getting this error:
VideoError: 1005: Invalid xml: URL: "http://pegasus.dev.webriverinteractive.com/API/Resource.ashx?ResourceID=16&FLVPlaybackVersion=2.1" No root node found; if url is for an flv it must have .flv extension and take no parameters
at fl.video::SMILManager/http://www.adobe.com/2007/flash/flvplayback/internal::xmlLoadEventHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
My flash code is below. I made sure that the swf is in the same directory folder to avoid the sandbox security issues. But I am not sure how to correct this error. Is there something else in the string that I need to add?
trace(FLVPlayback.VERSION);//2.1.0.14
import flash.display.MovieClip;
import fl.video.*;
var fv:String=root.loaderInfo.parameters.vars;
output.appendText(fv + " : " + root.loaderInfo.parameters.vars + "
");//working
var myVideo:FLVPlayback;
myVideo = new FLVPlayback();
myVideo.x=0;
myVideo.y=0;
myVideo.width = 640;
myVideo.height = 360;
//myVideo.source = "videos/Webriver_Video.mp4";
myVideo.source = "http://pegasus.dev.webriverinteractive.com/API/Resource.ashx?ResourceID=16"
myVideo.skin = "SkinOverPlaySeekMute.swf";
myVideo.skinBackgroundColor = 0x666666;
myVideo.skinBackgroundAlpha = 0.85;
myVideo.skinAutoHide = true;
addChildAt(myVideo,0);
myVideo.addEventListener(VideoEvent.COMPLETE, completePlay);
//use this function to jump to a new frame or loop
function completePlay(event:VideoEvent):void {
//myVideo.alpha=0.2;
//myVideo.play();
}