Cyanide
05-27-2003, 09:07 PM
I would like a tutorial on how to programatically draw an expanding box using an origin point (where the box starts expanding from), a point for the top left corner of the box, and a point for the bottom right corner of the box. Preferably all of that would be done using a single function that could be called multiple times similtaneously (so you can draw more than one box at a time).
I tried doing this myself but I could only get it to expand from the top left corner to the bottome right corner correctly. I think the best way to do this would be to have 4 small movieClips. Have the function place them at the origin point, assign each clip to a corner of the box, calculate the slope of the line from the origin to that point and then move the clip along that line to the corner while drawing lines between the clips. The problem is that I don't know how to do that.
I tried doing this myself but I could only get it to expand from the top left corner to the bottome right corner correctly. I think the best way to do this would be to have 4 small movieClips. Have the function place them at the origin point, assign each clip to a corner of the box, calculate the slope of the line from the origin to that point and then move the clip along that line to the corner while drawing lines between the clips. The problem is that I don't know how to do that.