Hello !:beam:
Can someone explain me this :
class myclass{
private var $x:Number;
private var targetMC:MovieClip;
public function myclass(mc:MovieClip, ix:Number){
$x = ix;
targetMC = mc;
}
public function drawLine():Void{
trace($x);//return 100
with(targetMC){
trace($x);//return undefined
lineStyle(1,0x000000,100);
moveTo(0,100);
lineTo($x,100);
}
}
}
//in fla file
var c:myclass = new myclass(this,100);
c.drawLine();
Why is it impossible to acces $x inside the “with” statement ?
I never had this kind of problem outside class…
thanks a lot !