문제

im in Flash CS5.

I have a TileList that loads its images from an XML, not all the images are the same size so they do not llook consistent wiyh the TileList.

So i want the TileList to Scale the images it gets from the XML.

How can i do this?

Thank you for any help i received.

도움이 되었습니까?

해결책

This should do what you want.

img.addEventListener(Event.COMPLETE, onLoad )
private function onLoad( e:Event ):void{
  var scale:Number = (targetHeight) / img.contentHeight;
  this.img.scaleX = scale;
  this.img.scaleY = scale;
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top