I want to get the top-right corner of an image in flex .... so far i can just get the x and y which are top-left by default .... sorry im a noob and if this is a dumb question
A:
Flex supports three coordinate systems as you will find here:
- global
- local
- content
Depending on how your image is laid-out you will have to use the image.x and width values and an appropriate conversion function.
dirkgently
2009-03-12 09:10:44
A:
I'm not very involved in Flex but for flash AS2 I would do:
var top:Number
var right:Number
top = myImageObj._y
right = myImageObj._x + myImageObj._width
There might be a bit different in AS3 I think they have changed "._y" to ".Y" but I'm not sure.
Anyway the principle is the same. Use the top left and then just add the width to get the right edge
Charlie boy
2009-03-12 09:41:01
Using AS3 syntax it would be like:top = myImageObj.y;right = myImageObj.x + myImageObj.width;
Ross Henderson
2009-06-17 16:04:42