diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/UserAvatar.as b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/UserAvatar.as old mode 100644 new mode 100755 index 65a6aa23e324cbbbfc01f5aa636af0956b5796b1..e86c44b7f65974eb33952ec426732b1a89628cde --- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/UserAvatar.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/UserAvatar.as @@ -3,6 +3,8 @@ package org.bigbluebutton.modules.videoconf.views import flash.display.Loader; import flash.events.Event; import flash.net.URLRequest; + + import mx.core.UIComponent; public class UserAvatar extends UserGraphic { @@ -18,14 +20,17 @@ package org.bigbluebutton.modules.videoconf.views _completed = false; _imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadingComplete); - addChild(_imageLoader); + var request:URLRequest = new URLRequest(avatarUrl); _imageLoader.load(request); } private function onLoadingComplete(event:Event):void { _completed = true; + addChild(_imageLoader); setOriginalDimensions(_imageLoader.width, _imageLoader.height); + if (parent && parent is UIComponent) + UIComponent(parent).invalidateDisplayList(); } override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/UserGraphic.as b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/UserGraphic.as index 494db394b799329f8bd7a514ff8b8884fdd56404..f81e95db79a0ca3eeb6fd1ab26882983c2aefa88 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/UserGraphic.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/UserGraphic.as @@ -62,12 +62,12 @@ package org.bigbluebutton.modules.videoconf.views object_height = unscaledHeight; object_width = Math.ceil(unscaledHeight * aspectRatio); object_y = BORDER_THICKNESS; - object_x = Math.floor((unscaledWidth - object.width) / 2); + object_x = Math.floor((unscaledWidth - object_width) / 2); } else { object_width = unscaledWidth; object_height = Math.ceil(unscaledWidth / aspectRatio); object_x = BORDER_THICKNESS; - object_y = Math.floor((unscaledHeight - object.height) / 2); + object_y = Math.floor((unscaledHeight - object_height) / 2); } object.x = object_x;