Solved

Drawing rectangle dynamically AS3

Posted on 2009-04-07
1
1,624 Views
Last Modified: 2013-11-11
Hi everyone,

I want to be able to dynamically draw multiple rectangles dynamically onto a stage but I'm not sure how to go about doing that. What I was thinking was this:
1. When user clicks on screen, start drawing at x,y
2. Whenever the mouse moves, update the screen with the new x,y to get the rectangle (but if the user hasn't moved the mouse yet, keep the rectangle with height and width to be 0, 0).
3. Once user let's the mouse go, don't update the rectangle anymore.

But I want to also allow the user to change the width and height once they create the rectangle. And when the user clicks on the side of the ages, be able to change it that way too.

It would be exactly what they would have as selection tools in image editors. Any idea how to program out?
0
Comment
Question by:dsrnu
1 Comment
 
LVL 19

Accepted Solution

by:
Gary Benade earned 500 total points
ID: 24085585
You could use something like the object handle component, you should be able to get the code you need out of the source

http://code.google.com/p/flex-object-handles/
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question