all groups > flash actionscript > october 2004 >
You're in the

flash actionscript

group:

AS 2 problem


AS 2 problem p_gupta
10/5/2004 7:09:20 PM
flash actionscript: Hi,

I am trying to use the new ActionScript 2.0
functionality using classes. I have created a
very simple example - which has a compilation error
and I do not understand why ? (I am using Flash MX 2004
professional - with publish settings to ActionScript 2.0)

I have included

#include "Trial.as"

and thats it. When I test run it the following error occurs.

Classes may only be defined in external ActionScript 2.0 class scripts.

If anyone has any idea abt this please let me know ..

Thanks for your time and effort ..

Re: AS 2 problem Igor Costa
10/5/2004 8:03:30 PM
Well, You can't use #include option to import a class inside a movie.

For classes you need to use import.yourclassname

but take a look and see if your movie is the same name of your class. remeber
classes are case sensitive.

bye
AddThis Social Bookmark Button