I’m sure that this is simple and I’m gona feel stupid once some one answers it for me but i can’t find an answer on the net. the hero.as class is as follows.
public class Hero
{
public var health:int;
[Embed(source="Resources/Images/ship1.png")]
private var layer0Class:Class;
private var layer0:Bitmap = new layer0Class();
public function Hero(health:int=1)
{
this.health = health;
trace("hero");
}
public function render():void
{
trace("hero is rendered");
addChild(layer0);
}
}
when I call the render function in the Main.as, it doesn’t render the picture, i’m brand new to this and no matter how i’ve tried to change things around I haven’t been able to hit on it. If anyone can tell me what I need to change, and why this doesn’t work, that would be a huge help. Sorry if this has been asked before, I didn’t see a thread on it.