# Automatic resize

**URL:** <https://forum.kirupa.com/t/automatic-resize/191108>\
**Category:** Uncategorized\
**Created:** [June 17, 2006, 7:21am UTC](https://forum.kirupa.com/t/automatic-resize/191108 "2006-06-17T07:21:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hyacinth](https://avatars.discourse-cdn.com/v4/letter/h/779978/32.png) [@hyacinth](https://forum.kirupa.com/u/hyacinth)\
**Post date:** [June 17, 2006, 7:21am UTC](https://forum.kirupa.com/t/automatic-resize/191108/1 "2006-06-17T07:21:24Z")

</div>

I know in php there is a tag to resize a image simply:

$width = 120;  
$height = 80;

```
  if ($width && ($size[0] &lt; $size[1])) {

```

## $width = ($height / $size[1]) \* $size[0]; } else { $height = ($width / $size[0]) \* $size[1]; }

However, how to do this in FLASH???
