Finding the x,y of an object on screen

The current .x and .y is local to its parent, I tried to work my way back by adding this.parent.x to its this.x to find the global .x and .y

But this seems to be not working… anyone can help me a bit on this? I need the x,y coordinates on screen of the object…

AH… okie…

My mistake was I created a canvas by drawRect(pos_x, pos_y…)
When I should have drawn with 0,0 and then manually set the .x and .y of that canvas… To me this is counter initiative… :frowning: