I am trying to use the lineTo method to draw a square. I have the code correct to draw a line or make a square appear but I can't put them together to create square that looks like it's being drawn. If anyone could help me I would appreciate it. Here are two samples...... I just want to basically get to where I have a border draw in using actionscript. Thanks Jason Code to draw just a basice Line: _root.createEmptyMovieClip("lineTest", 1); currentX = 100; drawI = setInterval(drawF, 5dra); _root.lineTest.lineStyle(3, 0x00990, 100); function drawF() { _root.lineTest.moveTo(currentX, 100); currentX += 5; _root.lineTest.lineTo(currentX, 100); if (currentX>=400) { clearInterval(drawI); } updateAfterEvent(); } Code to create a square: _root.createEmptyMovieClip("square_mc", 5); square_mc._x = 13; square_mc._y = 100; // square_mc.lineStyle(1, 0x000000, 100); square_mc.beginFill(0xFFFFFF,100); square_mc.moveTo(0, 0); square_mc.lineTo(100, 0); square_mc.lineTo(100, 100); square_mc.lineTo(0, 100); square_mc.lineTo(0, 0); square_mc.endFill();
hey J, Check this guy out, he's a genious: www.senocular.com Under Flash, click on Source files, and search for "Tween" or "Draw". that will definitely get ya started.
hey chipley.........thank you so much......i have been to his site before. i didn't even think to search for tween or draw. He's a genious alright. man..... thanks for your help.
Don't see what you're looking for? Try a search.
|