I'm trying to send a sprite to function method.
However I could not get sprite width, height.. I don't know why this make a problem.
Could you give me an advice for this?
function mouseClick(evt:MouseEvent) { // click event
var s:Sprite = new Sprite();
s.width = 595;
s.height = 842;
s.x = s.y = 0;
addChild(s);
dothis(s);
}
function dothis(s:Sprite){
trace("s.width : "+s.width + " / s.height : "+s.height);
// s.width and s.height returns 0 value always..
}
As you see, I got results of sprite's width and height are 0 always.
Why this happen to me?