View Full Version : Including a Class in Flash 9

Chuck Taylor
06-29-2007, 11:17 AM
I am a Flex developer. This is how I include a Class in Flex.

1. Create the class file in ./foo/bar/baz.as
1. In the main file: include foo.bar.Baz;

I tried the same in Flash 9, but it doesn't work. What am I doing wrong?

06-29-2007, 11:21 AM
you should use import, in both flex and flash.

Chuck Taylor
06-29-2007, 11:32 AM
Sorry that was an error, I used "import foo.bar.Baz;", it doesn't work for some reason. Am I right with the file location?

EDIT: The File name is case-sensitive! Baz.as solved the problem.