2 Replies Latest reply on Jun 12, 2006 12:32 PM by blemmo

    drawing API issue

    blemmo Level 1
      Hi people,

      I have a number of dynamically created MovieClips that are used to draw stuff into them. Because the content may be erased, the MCs have to clear() themselves sometimes. Now I want to have a kind of grid drawn also in those MCs, some small crosses every 200 pixels. To have the grid remaining when the drawn content is cleared, I attached another MC to every draw-MC, and draw the grid into those. That way the grid doesn't get deleted, but it is above the drawn content. =|

      So, is there a way to have the grid below the content? I tried to attach the grid-MC with a very low depth, but this doesn't change anything. I guess I could create another MC with a higher depth than the grid and draw into that one, but this seems a bit awkward, and I'd have to change quite a lot of code. Are there any other things I could try?

        • 1. Re: drawing API issue
          Inside the clip you created your grid, make a second clip and place the second clip at a 0 level and the gridmc at a 1 level, this way you do the drawing in your level 0 clip.
          • 2. Re: drawing API issue
            blemmo Level 1
            Hi Randy,

            thanks for the response, but it didn't work out. I guess I should explain again: the grid is currently above the things that are drawn by the user. I want it the other way, the grid should be in the background and the drawings over it.
            In the Flash Help, it says that everything drawn by AS is under the content that was added in the Flash IDE. Now the grid isn't created in the IDE, but it seems to be the same for any attached MC: it's above the AS drawing.
            Because the MCs I draw into can be moved, I want the grid attached to those MCs. So I guess the grid can be drawn into the MCs (and redrawn every time the MCs clear()), or I have to draw into another MC inside the main MC that is above the grid MC. As I don't want the 2nd (I want to draw directly into the main MC), I just see the 1st option here... or are there other ways?