3 Replies Latest reply on Nov 17, 2008 8:26 AM by graham howe

    dynamic lines

    graham howe
      Hi all,
      I was wondering if someone out there might know of a tutorial, or help me with my query.

      I have the primary menu positioned left, the sub menu appears right. I'd like to join these two menus, with a line which links/draws between the parent and the child. Know what I mean?

        • 1. Re: dynamic lines
          robdillon Most Valuable Participant
          You can use the lineTo or curveTo drawing methods to create the line. Here is some example code. You can find out more in the online help. Look up lineTo or curveTo.
          • 2. Re: dynamic lines
            Rothrock Level 5
            The drawing stuff is methods of the MovieClip class. So look there in the help files. But basically you've got.

            MovieClip.lineStyle(thickness, color, alpha,...);

            Don't forget to clear your lines when you are done with them. Don't just keep drawing the same line over and over either. Because it will slow down the player eventually.

            The trick is that you need to pick which movieclip you want to draw in and then carefully choose your x and y. You also have to keep the depths of the movieclips in mind so that your line is in the right stacking order and isn't on top of things you don't want it on top of.
            • 3. Re: dynamic lines
              graham howe Level 1
              Thanking you kindley folks.