# AS2 class scripts

**URL:** <https://forum.kirupa.com/t/as2-class-scripts/109549>\
**Category:** Uncategorized\
**Created:** [May 6, 2004, 4:24pm UTC](https://forum.kirupa.com/t/as2-class-scripts/109549 "2004-05-06T16:24:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![simpleSoft](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@simpleSoft](https://forum.kirupa.com/u/simpleSoft)\
**Post date:** [May 6, 2004, 4:24pm UTC](https://forum.kirupa.com/t/as2-class-scripts/109549/1 "2004-05-06T16:24:32Z")

</div>

I borrowed the idea (applying specific functions to a movie that you load later) for this code from a Dyanmic web application book I bought …and I modified it to work with a specific preloader movieclip i have made…

anyway when i complie it in AS2 it throws errors that look like this…

```auto

**Error** C:\Documents and Settings\Ryan Lovelett\Desktop\FlashTest Site v2\flash\progressBar.as: Line 13: ActionScript 2.0 class scripts may only define class or interface constructs.
	 };

```

```auto
 
**Error** C:\Documents and Settings\Ryan Lovelett\Desktop\FlashTest Site v2\flash\progressBar.as: Line 8: ActionScript 2.0 class scripts may only define class or interface constructs.
	 progressBarAS.prototype = new MovieClip();

```

What do I need to change it to…and if its not too much trouble, why do I need to change it?

\*\*I have attached my .as file
