class Projectile { public var mc:MovieClip ; public var xv:Number ; public var yv:Number ; // private var x:Number ; function Projectile (x:Number, y:Number, xv:Number, yv:Number) { this.mc = _root.attachMovie("projectile","p"+ _root.getNextHighestDepth(), _root.getNextHighestDepth() ) ; this.mc._x = x ; this.mc._y = y ; this.xv = xv ; this.yv = yv ; // trace("Inside constructor, x,y,h,w = " + x + " " + y + " " + h + " " + w) ; } public function setWidth(n:Number) : Void {this.mc._width = n ;} // get methods public function getWidth() : Number {return this.mc._width ;} // print method: prints out the object contents public function updateLoc() : Void { this.mc._x += this.xv ; this.mc._y += this.yv ; } }