Question

I have been struggling with this problem for a time and being unable to solve it led me here. I'm recently new to Actionscript (2.0). I want to do something similar to:

http://gnarshmallow.com/

Were i want something to be painted behind a moving object in real time. I would like some advice on how to approach the problem.

Was it helpful?

Solution

You need to use line drawing to do this. You will need two points, and it will draw a line from one to the next. I recommend having it run on every movement call. Have it draw the line between the racer's location in the previous frame, and his location in the current frame. For further reference, check out this page.

http://www.actionscript.org/resources/articles/730/1/Drawing-lines-with-AS2/Page1.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top