-
[help] help using lines
Hey guys. It's time once again to help me out with something that flash is probably incapable of.
I'm working on a game where the user's player movieclip can draw lines (using moveTo and lineTo) and then walk on the lines.
Well, I have no trouble allowing the player to draw, but I'm not exactly sure how to get the player's MC to "walk" on the lines, as if they were some sort of boundary that kept his MC from falling.
My first idea was to create an empty movieclip and try to attach all these new lines into it, but I soon discovered that you cannot attach a movieclip that isn't in the library. Unless there is a way to assign an idName with code?
Once that is done I could use a hitTest with a true shapeflag to allow the player's MC to walk on these lines.
Does anyone else have any better ideas or have any solutions?
-
Either create a balnk movie clip and put that in the library, or just use createEmptyMovieClip(). Then just draw your lines in that and do hitTest checks with it.
Ali
-
Thanks man!
It never dawned on me for some reason. After some tinkering, I've got it working... despite a few bugs. But I'll figure them out.
Thanks again.