[AS3][Help] Adding A Sprite To A Stage
What's wrong with this code? It compiles ok, but nothing shows up. "Titlebmd" is the bitmapdata from an embeded png file.
Code:
asprite = new Sprite;
asprite.width = 512;
asprite.height = 279;
asprite.graphics.beginBitmapFill(Titlebmd); // Is this the problem?
asprite.x = 300;
asprite.y = 300;
asprite.alpha = 1;
stage.addChild(asprite);
On a related note, how would I change the source bitmapdata in real time so I can sequence through a series of frames? Thanks.