Reputation: 5818
I've got a SWFLoader aligned to the center of an App like below:
<mx:SWFLoader id="imgLoader" scaleContent="true" width="100" height="100" horizontalCenter="0" verticalCenter="0"/>
The problem is that when I load new images of various sizes, they are not aligned to the center of the app. If the image is 10x10 pixels it is aligned to 0,0 inside the SWFLoader as opposed to the center of the app. So now it looks like the image is off (-90,-90) off the center.
How do I make it so that the image is always center aligned regardless of it's size?
Upvotes: 0
Views: 621
Reputation: 2806
Just set the horizontalAlign = center
and verticalAlign = middle
for the SWFLoader. That should do the trick.
Upvotes: 2