Hi,
If you are extending a movie-clip, why can't you just draw in there??
e.g.
class DrawBox extends MovieClip {
public function drawBox() {
beginFill(0xFF0000,100);
moveTo(0,0);
lineTo(100,0);
lineTo(100,100);
lineTo(0,100);
lineTo(0,0);
endFill();
}
}
attachMovie("DrawBox", "myBox", 1);
myBox.drawBox();
myBox._y = ...
HTH
Glen
O. Fouad wrote:
Ok, this is just frustrating me... somebody help me please :(
i've got this class DrawBox that as it says, draws a box on the stage..
class DrawBox extends MovieClip {
var myMC:MovieClip;
public function DrawBox(boxName:String) {
this.myMC =
_root.createEmptyMovieClip(boxName,_root.getNextHighestDepth());
this.myMC.beginFill(0xFF0000,100);
this.myMC.moveTo(0,0);
this.myMC.lineTo(100,0);
this.myMC.lineTo(100,100);
this.myMC.lineTo(0,100);
this.myMC.lineTo(0,0);
this.myMC.endFill();
}
}
this works so fine and in fact i've got a 100x100 red box on my stage,
and i
thought that extending MovieClip, this class, should get the same
behaviours
of a MovieClip like this:
var myBox:DrawBox("boxname");
myBox._y = 100;
myBox._alpha = 50;
but desperately it doesnt work as in the box alpha and y doesnt change...
is there something Missing?
Thanks :)
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com