Forum ActionScript 3.0 Avatar image is not getting updated

Problems and discussions relating to ActionScript 3.0 here.

Avatar image is not getting updated

Postby santuplaygames » October 6th, 2014, 7:49 am

Hi All,
We are developing multiplayer game where we show user's Avatar image. It is working fine only if i have an avatar image before loading the game for the first time. After that, if i add/change or even if i remove my avatar image from yahoo, it is not being updated. Please help me in solving this. Here is my code.

Code: Select all
private function loadYahooDisplayPic(yahooID:String):void
{
    if(this.yahoo) {
        this.yahoo.profiles.loadProfiles([yahooID], onProfileLoadSuccess,  onProfileLoadError);
    }
}

private function onProfileLoadError(error:PlayerIOError):void
{
    trace("Profile load error : " + error.message);
}

private function onProfileLoadSuccess(profiles:Array):void
{
    var imageURL:String = profiles[0].avatarUrl;
    var urlReqObj:URLRequest = new URLRequest();
    urlReqObj.url = imageURL;
   
    var loaderObj:Loader = new Loader();
    loaderObj.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
    loaderObj.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
    loaderObj.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
    loaderObj.load(urlReqObj);
}
santuplaygames
 
Posts: 1
Joined: September 30th, 2014, 10:54 am

Return to ActionScript 3.0



cron