The code below is supposed to display a bitmapData on the stage for debugging purposes but just doesn’t seem to display anything. I added the ellipse section to check but that doesn’t draw anything either.
I’m a total noob so there’s probably something obvious I’m missing.
import flash.display.MovieClip;
import flash.display.BitmapData;
import flash.display.Stage;
import flash.events.Event;
public class BitmapShowMC extends MovieClip
{
public function MovieClip()
{
}
public function setup(bitmapData:BitmapData,st:Stage)
{
x=200; y=20;
width=70; height=30;
graphics.beginFill(0x777777);
graphics.drawEllipse(35,10,70,20);
graphics.endFill();
graphics.beginBitmapFill(bitmapData);
graphics.drawRect(0,0,70,30);
graphics.endFill();
st.addChild(this);
st.addEventListener(Event.ENTER_FRAME,movement);
trace("BitmapShow");
}
private function movement(e:Event)
{
y+=1;
}
}