I didnt know if I should post this in loading or tweening....
So I am loading in another swf with LoaderMax to play videos through youtube in my movie. I am also animating objects at the same time in the swf that is loading in the youtube swf. For some reason, this is causing a security error. (If I dont load the swf but animate, no error. If I dont animate but load the swf, no error. But both together. Error)
Not sure how to fix this. Error Msg:
SecurityError: Error #2121: Security sandbox violation: BitmapData.draw: http://www.mydomain.com.au/facebook/FacebookCommunityTab.swf cannot access http://s.ytimg.com/yt/swfbin/watch_as3-vflFkxRDW.swf. This may be worked around by calling Security.allowDomain.
at flash.display::BitmapData/draw()
at com.greensock.plugins::MotionBlurPlugin/set changeFactor()
at com.greensock::TweenMax/renderTime()
at com.greensock.core::SimpleTimeline/renderTime()
at com.greensock::TweenLite$/updateAll()
Code for loading and animating:
private function setupVideoPlayer():void {
//Loading in the video player
var cntext:LoaderContext = new LoaderContext(true);
_loader = new SWFLoader("YouTubeSingle.swf", { onComplete:onLoadSWFComplete, onError:onLoadSWFError, onSecurityError:onLoadSecurityError, onScriptAccessDenied: onLoadScriptError ,context: cntext} );
addChild(_loader.content);
_loader.load();
}
private function onLoadSWFComplete(event:LoaderEvent):void {
_youTubePlayer = _loader.rawContent;
_youTubePlayer.x = 10;
_youTubePlayer.y = 200;
}
private function animateCommentsIn():void { //onComplete:onFinishTween
TweenMax.allTo([comment1, comment2, comment4, comment5, comment3], 2, { bezierThrough:[ { x:449, y:490 }, { x:"-90", y: "225" } ], scale:.9, delay:.3, alpha:1, motionBlur:true, ease:Cubic.easeInOut }, .4 , onCompleteAll);
}
Its also worth noting that none of the errors I am listening for are getting tripped.