Loading Profile Images on VK.com in ActionScript -


i have iframe application in vk.com. can use api looks fine when want load profile images security sandbox error. when print result , errors this: (i using greensock imageloader)

myurl : 'my image url on cs408919 subdomain of vk'
loading crossdomain on cs408919
scriptaccessdenied : error #2048
securityerror : error #2048
error : error #2048
scriptaccessdenied : error #2123 security sandbox violation, no policy files granted access

it seems me crossdomain.xml issue couldn't find right one. thanks...

yes, it's crossdomain issue, vk sub-domains images doesn't provide crossdomain.xml user avatars, still able load (and add display list well) them. can't access loaded content (and set smooth bitmap flag example, or draw hole stage vk images on it).

if need access content can use "policy-hack", it's hack, can fixed in fp update (i guess answer may bring closer moment:) ):

the idea listen added event if image loader:

protected var _prepareloaderbitmap:bitmap;  _prepareloader.addeventlistener(event.added, onprepareloader); _prepareloader.contentloaderinfo.addeventlistener(event.complete, onprepareloader); 

and listener:

protected function onprepareloader(event:event):void {     //event added fired bitmap (not swfs)     if(event.type == event.added)     {         _prepareloaderbitmap = event.target bitmap;     }     else if (event.type == event.complete)     {         if(_prepareloaderbitmap)         {             trace("loaded image size:", _prepareloaderbitmap.width, "x", _prepareloaderbitmap.height);         }     } } 

having reference loaded bitmap can add instead of crossdomain issued loader.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -