0
votes

I'm still pretty new to class-based programming in flash, and I'm having some trouble getting my swf to "find" a class that I want to include in it.

Everything is in the same directory as the Flash file and every other class loads properly (they're all named according to the same pattern and they all reside in the same directory). The only thing that is different about this class that I can't find is that it doesn't have a corresponding MovieClip and the others do.

Is this the way things work in Flash? Do I have to create a dummy movieclip to give Flash something to grab on to? Or maybe set something in the IDE besides the classpath in order to give it a defined linkage?

Sorry! SS

3

3 Answers

1
votes

No, it shouldn't need a dummy movieclip or anything. I presume it is not a display related object in itself (doesn't extend Movieclip or anything like that)? I'd suggest checking the classpath, but it seems like you've already done that. What sort of error do you get?

0
votes

Sorry everyone (specifically, mitim) -

It turns out that this was a case of Flash's very terse error reporting rather than the lack of a movieclip. I didn't know that Flash will refuse to find a class that has other errors in it. I found and fixed the errors and that enabled Flash to find the class.

Thanks anyway!

0
votes

First, ActionScript demands that package of the class (e.g. mylib.io.socket) must correspond with path to the file of this class (e.g. .../mylib/io/socket) built from any project source directory (current directory "." by default, but can be extended at Source path tab in ActionScript Settings window in Flash IDE).

Second, Flash IDE wouldn't include class if it's not used. You should use "clean class" (that doesn't extends any symbol from library) in your code or place "library class" to the stage.