# Problem moving code from timeline to doc class

**URL:** <https://forum.kirupa.com/t/problem-moving-code-from-timeline-to-doc-class/267331>\
**Category:** flash\
**Created:** [July 30, 2008, 7:48pm UTC](https://forum.kirupa.com/t/problem-moving-code-from-timeline-to-doc-class/267331 "2008-07-30T19:48:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![spike50](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@spike50](https://forum.kirupa.com/u/spike50)\
**Post date:** [July 30, 2008, 7:48pm UTC](https://forum.kirupa.com/t/problem-moving-code-from-timeline-to-doc-class/267331/1 "2008-07-30T19:48:16Z")

</div>

Hi,

I am pretty new to AS. I’m trying to move some working AS3 code from the main timeline to a doc class but am getting a series of error messages. Can anyone tell me what I’m doing wrong? I’m attaching the FLA and AS files. The AS has my code attempt at the top and the original code (from the timeline) commented out at the bottom. Thanks for any help!

M
