I believe Facebook will need to have a crossdomain.xml policy file on their servers.
--- In [email protected], "noam.malter" <[EMAIL PROTECTED]> wrote: > > I am trying to write a simple application that retrieves my pictures > from my Facebook account and then displays the images and run some > effects on it, e.g. fade, move, iris etc. Everything seems to work > except for the iris effect. I have done some research and found that > when I import pictures from another domain and want to work on their > bitmap data I need to set the checkPolicyFile property on the loader. > I did that and then I get an error 'No policy files granted access'. > The code is provided below. Any help is appreciated. > > Thanks, > Noam > > ===================================================== > > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > layout="absolute"> > > <mx:Script> > <![CDATA[ > > [Bindable] > private var loaderContext : LoaderContext; > > private function imageInit() : void > { > loaderContext = new LoaderContext(); > loaderContext.checkPolicyFile = true; > img.loaderContext = loaderContext; > img.load('http://photos- > a.ak.facebook.com/photos-ak- > sf2p/v190/104/17/564197930/s564197930_459432_6972.jpg'); > } > > ]]> > </mx:Script> > > <mx:Fade alphaFrom="0" alphaTo="1" id="fadeIn" > target="{img}"/> > <mx:Rotate angleFrom="0" angleTo="90" id="rotate" > target="{img}"/> > <mx:Rotate angleFrom="90" angleTo="0" id="rotateBack" > target="{img}"/> > <mx:Iris scaleXFrom="1" scaleXTo="0.01" id="iris1" > target="{img}"/> > <mx:Iris scaleXFrom="0.01" scaleXTo="1" id="irisBack" > target="{img}"/> > <mx:Move xFrom="0" xTo="50" id="move1" target="{img}"/> > <mx:Move xFrom="50" xTo="0" id="move2" target="{img}"/> > <mx:Panel width="50%" height="50%" horizontalAlign="center" > verticalAlign="middle" backgroundColor="black"> > <mx:VBox> > > <mx:Image id="img" initialize="imageInit()"/> > > <mx:Button label="fade" click="fadeIn.play > ()"/> > <mx:Button label="rotate" click="rotate.play > ()"/> > <mx:Button label="rotate Back" > click="rotateBack.play()"/> > <mx:Button label="iris1" click="iris1.play > ()"/> > <mx:Button label="iris Back" > click="irisBack.play()"/> > <mx:Button label="move1" click="move1.play > ()"/> > <mx:Button label="move2" click="move2.play > ()"/> > </mx:VBox> > </mx:Panel> > > </mx:Application> >

