Hi,
I have a really small problem, but I’m curious as to why it occurs. Allow me to shared my frustration here.
I have a folder “Source”. In it, I have an swf “Test.swf” and another folder “code”. In the “code” folder, I have an as file “Zoo.as”.
The “Zoo.as” contains this code:
package zoo{
public class VirtualZoo {
public function VirtualZoo() {
}
}
}
Now, in the Test.fla, in the Document Class, I have entered code.Zoo
On compile, it throws me this error :
5000: The class ‘code.Zoo’ must subclass ‘flash.display.MovieClip’ since it is linked to a library symbol of that type.
When I alter the code to what is shown below, it works fine :
package zoo{
import flash.display.MovieClip;
public class VirtualZoo extends MovieClip {
public function VirtualZoo() {
}
}
}
I don’t understand why I need to import the MovieClip though, I haven’t used a MovieClip anywhere. Can someone please help me understand whats going on?
Thanks a lot! I know it’s a really basic question, but instead of just finding the solution as I did, I want to understand why! Why that’s the solution. Thanks again.