I'm not exactly sure but i'm guessing my problem has to do with how i'm declaring my variables.
Is the below code legal in AS3?
var fish1:Fish = new Fish;
var fish2:Fish = new Fish;
var fish3:Fish = new Fish;
var fish4:Fish = new Fish;
addChild(fish1);
addChild(fish2);
addChild(fish3);
addChild(fish4);
fish1.x = 0;
fish2.x = 150;
fish3.x = 300;
fish4.x = 450;
i'm getting compiler errors for each line of addChild saying:
Main.as, Line 14 1180: Call to a possibly undefined method addChild. Main.as, Line 14 1120: Access of undefined property fish3.
and for every line where i'm specifying the x coordinates of my fish i'm getting a compiler error saying
Main.as, Line 15 1120: Access of undefined property fish4.
the fish variables are of type Fish and I've defined them in my library in my .fla file. Thank you in advanced!