background info...I have been creating my assets in the flash library for the interfaces i have built and just linking them. But now I want to draw the shape I need via code. So I started with a very basic "row" class, or so I thought. Here she is:
Code:
package classes
{
import flash.display.Sprite;
import flash.display.Shape;
import flash.display.Graphics;
/**
* ...
* @author Ray Brown
*/
public class aRow extends Sprite
{
public function aRow(w:Number = 615, h:Number = 15)
{
var rowSprite:Sprite = new Sprite();
var row:Shape = new Shape();
row.graphics.beginFill(0xFF0000, 1);
row.graphics.lineStyle(1, 0xCCCCCC, 1);
row.graphics.drawRect(0, 0, w, h);
row.graphics.endFill();
rowSprite.addChild(row);
addChild(rowSprite);
}
}
}
This in my main class file, import the class:
Code:
import classes.aRow;
So I thought, to make it show, all I had to do is:
Code:
var oneRow:aRow = new aRow();
BUT, I get no errors, and NO SHAPE? What I do wrong?