# Converting code to use in AS2

**URL:** https://forum.kirupa.com/t/converting-code-to-use-in-as2/294029
**Category:** flash
**Created:** [August 7, 2009, 6:18am UTC](https://forum.kirupa.com/t/converting-code-to-use-in-as2/294029 "2009-08-07T06:18:32Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![stogkos](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@stogkos](https://forum.kirupa.com/u/stogkos)
#### Post date: [August 7, 2009, 6:18am UTC](https://forum.kirupa.com/t/converting-code-to-use-in-as2/294029/1 "2009-08-07T06:18:32Z")

</div>

Hi,

is there a code for Actionscript 2.0 for the “Auto-Resizing and Centering your Content” Tutorial  
all my code is in AS2 and i cant change it.

The link to the tutorial is  
[http://www.kirupa.com/developer/as3/resizing\_centering\_as3.htm](http://www.kirupa.com/developer/as3/resizing_centering_as3.htm)

I get an error in AS2 in the line

\*\*function updateSize(e:Event) \*\*

Thanks
