PDA

View Full Version : Can we create a rectangle by script?


tuyle
11-13-2002, 05:41 AM
Thanks

annexion
11-13-2002, 05:51 AM
Put this in frame one of the main stage:

_root.createEmptyMovieClip("rect",0);
rect.lineStyle(1,0x000000,100);
rect.moveTo(100,100);
rect.lineTo(300,100);
rect.lineTo(300,200);
rect.lineTo(100,200);
rect.lineTo(100,100);

This is for the drawing API in Flash MX, so if you are using Flash 5, it won't work.

Cragdo
11-13-2002, 05:52 AM
That's neat ... It's starting to look more and more like GDI hahaha 4 years of C++ is going to pay off afterall jk

tuyle
11-13-2002, 06:25 AM
That's all I need. Thank you very much!

Clint Critchlow
11-14-2002, 06:42 PM
There are some cool shapes to draw in this lesson <http://www.macromedia.com/desdev/mx/flash/articles/adv_draw_methods.html>

tuyle
11-15-2002, 12:21 AM
Wow, it's very nice URL. Thanks too much! Is there any one?