Connecting Dots with ActionScript...?
Copy link to clipboard
Copied
Hey all, I need some help with a "Shape Making Project"
It is for a project for one of my college classes, but my professor is absolutely useless so its been an extremely difficult endeavour learning this stuff on my own
What we have to make is a program that will allow a person to create a triangle.
- They do this by clicking on the screen anywhere 3 times. Where they click, a dot will appear.
- When they click a second time, a second dot will appear and a line will connect it back to the first dot.
- Then with the final dot, the program will connect all the dots together making it a triangle.
I know how to create shapes using ActionScript, but I have no idea how to make the shapes connect and making them create an entirely new shape.
I've done some research online and found something about lineTo and moveTo but since ActionScript is extremely difficult for me, I'm having a very hard time understanding it.
ANY help or examples would be appreciated! Thank you for reading!
Copy link to clipboard
Copied
You are on the right track. You do not want to be thinking in terms of shapes. You want to be looking into how to draw lines. lineTo and moveTo are part of that.
I suggest you and Google become good friends and you learn how to use it to solve all of your school challenges. That's what I have always done. Usually a good approach is to specify your search terms using "AS3 keywords". In your case now you should use "AS3 draw lines", and it can often help to include the word tutorial at the end of it as well "AS3 draw lines tutorial"
I think you will find this assignment is not very difficult at all once you see how to draw a line between two points.
Copy link to clipboard
Copied
Use WCK/Box2d for that project.... Also watch this http://gotoandlearn.com/play.php?id=135

