Error Thrown When I Add AS to Timeline. Class Interfere?

Alright, so i am working on a game, and i have a document class set. now i want to add some AS to the main timeline, such as a preloader and other little things. but when i do put some AS on the timeline, it throws this error:


1180: Call to a possibly undefined method addFrameScript.

and highlights:


package {

as the target/source of the error.

Any solutions to this?

I don’t think that you can have AS on the timeline and have a custom document class because the AS on the timeline is converted into part of a document class if you don’t specify one.

However, you can add the code that you would have had on the timeline using addFrameScript: http://www.kirupa.com/forum/showthread.php?p=2098268