PDA

View Full Version : Problem setting variables in extending class



pixelrevision
December 7th, 2007, 03:20 PM
I'm having problems with setting a variable in an extended class file. For whatever reason the variable walkable is coming up as undefined. Can anyone help me with this?

The super class is:

package com.pixelrevision.tilez.tiles{
public class Tile{
public var walkable:Boolean;
public function Tile(){
walkable = true;
}
}

}

And extending it is:

package com.pixelrevision.tilez.tiles{
import com.pixelrevision.tilez.tiles.Tile;
public class WallTile extends Tile{
public function WallTile(){
super();
walkable = false;
}
}
}