How can I extend components like buttons to use x and y value as the center of the component, not the top left?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s pretty easy in Flex 4 :). They have a
transformAroundmethod in the UIComponent, that allows you to transform the position/scale/rotation of a component around any arbitrary pivot. So you could do this:You could customize/optimize that, but that’s the jist :).
If you’re using Flex 3, then I’d look into how they did that. It’s pretty hardcore, lots of Matrix/Matrix3D stuff.