ForumsProgramming ForumSome weired problem with MovieClip inheritance

0 2701
danimes
offline
danimes
1 posts
Nomad

I have the following code:

public class Level extends MovieClip

{

public function Level()

{

var matrix:Matrix = new Matrix();

matrix.translate(-250, -250);

matrix.rotate(Math.PI / 6);

matrix.scale(1, 0.5);

matrix.translate(250, 250);

gridView.transform.matrix = matrix; // error here when i try new Level1();

}

}

public class Level1 extends Level

{

public function Level1()

{

super();

}

}


Level has gridView defined in designer.
When I do something like:
new Level();
it works, but
new Level1();
throws error where in the line where i noted it, and says that gridView is null.

If its not null in the base class Level, why is it null in derived empty class Level1?
  • 0 Replies
Showing 1-0 of 0