jhaddington
11-14-2008, 04:49 PM
Hi Guys,
This maybe a really simple question but I seem to be having a problem with getting the width of a picture I am loading. Obviously the height and width of the logo isn't 0 however when doing a trace on logo.width is it coming back 0. Is it something I am doing wrong!? My code is below.
Cheers
:)
var logoPicture:Loader = new Loader();
logoPicture.load(new URLRequest("http://www.saferonline.maybovrm.com/images/logos/"+logo));
addChild(logoPicture);
trace(logoPicture.width);
trace(logoPicture.height);
//logoPicture.x = (centerPoint.x - logoWidth);
logoPicture.y = centerPoint.y - (logoPicture.height*0.5);
This maybe a really simple question but I seem to be having a problem with getting the width of a picture I am loading. Obviously the height and width of the logo isn't 0 however when doing a trace on logo.width is it coming back 0. Is it something I am doing wrong!? My code is below.
Cheers
:)
var logoPicture:Loader = new Loader();
logoPicture.load(new URLRequest("http://www.saferonline.maybovrm.com/images/logos/"+logo));
addChild(logoPicture);
trace(logoPicture.width);
trace(logoPicture.height);
//logoPicture.x = (centerPoint.x - logoWidth);
logoPicture.y = centerPoint.y - (logoPicture.height*0.5);