# Thumb auto resize

**URL:** https://forum.kirupa.com/t/thumb-auto-resize/252463
**Category:** flash
**Created:** [February 20, 2008, 12:18pm UTC](https://forum.kirupa.com/t/thumb-auto-resize/252463 "2008-02-20T12:18:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![LeonardoZimbres](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/leonardozimbres/32/4035_2.png) [@LeonardoZimbres](https://forum.kirupa.com/u/LeonardoZimbres)
#### Post date: [February 20, 2008, 12:18pm UTC](https://forum.kirupa.com/t/thumb-auto-resize/252463/1 "2008-02-20T12:18:41Z")

</div>

How can I autosize images in actionscript 3?

First the loader creation:  
[COLOR=Blue]  
l = new Loader();  
thumb.here.addChild(l);  
var urlRequeste:URLRequest = new URLRequest(main\_fotos\*.imagem);  
l.load(urlRequeste);  
l.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);[/COLOR]

So when load is complete, the function is called:

[COLOR=Blue]function completeHandler(evt:Event):void {  
trace(evt.currentTarget.width)  
}  
[COLOR=Black]  
The trace outputs the width correct. But it is read olny. How can I resize it?[/COLOR]  
[/COLOR]
