A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [help] help using lines

  1. #1
    Senior Member
    Join Date
    Feb 2003
    Posts
    146

    [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?
    Last edited by Wattz; 11-24-2005 at 07:01 PM.

  2. #2
    Style Through Simplicity alillm's Avatar
    Join Date
    Mar 2004
    Location
    Wales
    Posts
    1,988
    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

  3. #3
    Senior Member
    Join Date
    Feb 2003
    Posts
    146
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center