# Actionscript broke without touching it

**URL:** <https://forum.kirupa.com/t/actionscript-broke-without-touching-it/298178>\
**Category:** Uncategorized\
**Created:** [October 14, 2009, 7:22pm UTC](https://forum.kirupa.com/t/actionscript-broke-without-touching-it/298178 "2009-10-14T19:22:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![digibrink](https://avatars.discourse-cdn.com/v4/letter/d/9de0a6/32.png) [@digibrink](https://forum.kirupa.com/u/digibrink)\
**Post date:** [October 14, 2009, 7:22pm UTC](https://forum.kirupa.com/t/actionscript-broke-without-touching-it/298178/1 "2009-10-14T19:22:26Z")

</div>

Hi all,

I had something very weird happen. A line of AS2 broke on me without me touching the flash or as file. I went to republish the swf and now get the error:

The class or interface ‘Document’ could not be loaded.

in regards to:

var doc: Document = new Document(1003, 670);

This code is used by an \*.as file to dynamically center the website when each page loads/when a browser is scaled. I just don’t understand how the code, which worked before, can just stop working…so perplexed. Any ideas?
