-
Drawing in Flex
I would like to "draw" simple shape like rectangle over an loaded image inside Image component. I don't want to alter loaded image, just to draw a rectangle for example over it with possibility to later click and interact with it. I have no idea where to start since i have no experience with drawing in Flex. What would be the best way to do that? I would really appreciate it if somene can point me in right direction.
thanks in advance
-
Drawing API Tutorial
blu3,
I posted a tutorial/example on how to use the AS 3 Drawing API on my blog site:
http://tdotblog.info/?q=node/19
Basically, you create a Shape object. Use drawRect of its graphics object and attach it to an empty UIComponent. Lastily you can attach the UIComponent to anything you want.
-
Thank you for tutorial, it's really useful. I have one question though, i drawed the rectangle shape by defining 'UIComponent' object and then used its 'graphic' property which allowed me to use 'drawRect' and other drawing methods. Is there a reason why i should be using Shape object like you suggested over this method i used?
thanks once again,
best regards