Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

amnporter

Members
  • Posts

    1
  • Joined

  • Last visited

amnporter's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I've come across and issue which I have found a work around. I am loading and playing external FLVs from a different server from where my SWF is located. When published locally and pulling in the FLVs, everything worked fine. When placing the SWF online, it wouldn't load the FLVs. After a day of troubleshooting and using crossdomain policies, I've narrowed it down to the loading procedure used. My findings are below. Please feel free to comment or let me know if I missed something that would have prevented me from wasting a day. I have done the following: 1. added crossdomain.xml to the site where the FLVs reside 2. added import flash.system.Security; Security.loadPolicyFile("http://www.mywebsite.com/crossdomain.xml"); <br><br> to my FLA The above files/code didn't have an impact on anything after my testing. I was loading the videos through the following code: var numVids = this.model.xml.q.opt.length(); for (var k:Number = 1; k <= numVids; k++) { var videoSrc:String = vidPath + this.model.xml.q.opt[(k - 1)].source; urls.push(videoSrc); var videoSrcFB:String = vidPath + this.model.xml.q.opt[(k - 1)].fb.source; urls.push(videoSrcFB); } //trace ("urls = " + urls); var queue:LoaderMax = LoaderMax.parse(urls, { onProgress:_progressHandler, onComplete:_queueComplete, onChildComplete:_childComplete }, { width:873.6, height:479, autoPlay:false } ); queue.load(); The above code worked fine when publishing the SWF and testing locally but wouldn't load the FLVs once I placed it online. My workaround: var numVids = this.model.xml.q.opt.length(); for (var k:Number = 1; k <= numVids; k++) { var videoSrc:String = vidPath + this.model.xml.q.opt[(k - 1)].source; urls.push(videoSrc); var videoSrcFB:String = vidPath + this.model.xml.q.opt[(k - 1)].fb.source; urls.push(videoSrcFB); } //trace ("urls = " + urls); var queue:LoaderMax = LoaderMax.parse(urls, { onProgress:_progressHandler, onComplete:_queueComplete, onChildComplete:_childComplete }, { width:873.6, height:479, autoPlay:false } ); for (var m:Number = 1; m <= urls.length; m++) { //append several loaders var load = urls[(m - 1)]; var video:VideoLoader = new VideoLoader(load, { onComplete:_queueComplete, width:873.6, height:479, autoPlay:false } ); //<--THIS IS THE CODE THAT WORKED video.load(); } I would much rather keep the LoaderMax.parse function to keep the code nice and clean but doesn't seem to do the trick when trying to play FLVs from diff server. Has anyone run into similar issues?
×