This is simply not doing anything.. Drawing atleast..Code:package AS.Geo { import flash.display.Shape; import flash.display.MovieClip; public class Square extends MovieClip { private var xVal:int; private var yVal:int; private var wVal:int; private var hVal:int; private var colorVal:uint; private var shapeObj:Shape; function Square(XValue:int, YValue:int, Width:int, Height:int, hexColor:uint) { this.xVal = XValue; this.yVal = YValue; this.wVal = Width; this.hVal = Height; this.colorVal = hexColor; this.drawSquare(); } private function drawSquare():void { this.xVal = 0; this.yVal = 0; this.hVal = 200; this.wVal = 200; this.shapeObj = new Shape(); this.shapeObj.graphics.lineStyle(0, 0x0000FF, 1); this.shapeObj.graphics.beginFill(0x000000, .5); this.shapeObj.graphics.drawRect(0, 0, this.wVal, this.hVal); this.shapeObj.graphics.endFill(); addChild(this.shapeObj); this.shapeObj.x = this.xVal; this.shapeObj.y = this.yVal; } } }
No errors.. and i am following a tutorial which i believe everything is the exact same.
Note that just to keep sure control of it all, i reassigned all the x,y,w,h values just to not make me jump around to different files to make sure the class is giving the correct values.. if that makes any sense.
*edited for crappy title lol*





Reply With Quote