Hi,
I’ve stumbled accross a problem/behaviour I can’t understand so any help is appreciated.
I’ll use **sprite **as the Sprite varname and **uiLoader **as the UILoader var name.
I am using a sprite and load( sprite.addChild(uiLoader) ) various UILoader variables in it.
Now if I just use the sprite and set width height
sprite.width = 300;
sprite.height = 300;
the swf that is loaded through the uiLoader variable is being stretched to the width of the sprite. I tried playing with the **maintainAspectRatio **and **scaleContent **values but it didn’t work as expected.
Now if I first draw a rectangle with the sprite ( sprite.graphics.drawRect(0, 0, 300, 100) ) and then I add the uiLoader ( sprite.addChild(uiLoader) ) stretching doesn’t happen and the loaded swf is loaded as expected. As well I
Any idea why I have to draw a rect and add the **UILoader **instead of just setting **width height **to the sprite directly to get no stretching?
Thanks
ste