Ok, i think i’m missing something here, i’ve trying to do some refactoring with my code but something is not working right, this is what t had :
_bottomArt = new Image(ART);
_bottomArt .centerOO();
_bottomArt .smooth = true;
_bottomArt .x = ART_WIDTH / 2;
_bottomArt .y = ART_HEIGHT;
i created this function :
private function initART(image:Image):void
{
image = new Image(ART);
if (image != null) {
trace("image is not null");
image.centerOO();
image.smooth = true;
image.x = ART_WIDTH / 2;
image.y = ART_HEIGHT;
}
if (_bottomArt == null) {
trace("_bottomArt is null");
}
}
i call it while passing the parameter :
initMiddleGears(_bottomArt);
i get the both traces :
trace("image is not null");
trace("_bottomArt is null");
am i missing something ?