1 Reply Latest reply on Feb 19, 2007 12:59 PM by MotionMaker

    I'm generating a grid from xml...

    depakchopra Level 1
      My project here is getting pretty complicated, and I fear that in trying to explain this, I might confuse you. If so, please let me know.

      To start with, I am generating a grid through xml. In the code supplied here, there are about 800 little 25 X 25 squares. All of these squares are mcbuttons with the linkage butTemp. When you roll over the square you are also generating two text fields in a movieclip called but state. The text fields are instanced through 'username_txt' and 'statement_txt'.

      OK, all of this works. I have a grid, you roll over it, and a speech bubble with two xml generated lines of text pop up. My PROBLEM is that I dont understand how to manipulate the speech bubble so that it is staying on top of the grid. That probably doesn't make sense. Imagine that you are at the top left square and when you roll over it, a speech bubble like you would see in newspaper cartoons comes down and to the right. This fits nicely over the grid. However as you scroll along and hit the top right square, the speech bubble is hanging way off the side.

      To sum it up, How do you change the speech bubble from image one that will hang down and to the right, to image two that will hang down and to the left. How can I code it so that say 8 buttons from the right, the mc changes.

      Thanks for reading all of that and any suggestions would be gratefully accepted.
        • 1. Re: I'm generating a grid from xml...
          MotionMaker Level 1
          "To sum it up, How do you change the speech bubble from image one that will hang down and to the right, to image two that will hang down and to the left. How can I code it so that say 8 buttons from the right, the mc changes."

          Either two movieClips and toggle between two or one MovieClip where on frame is one image and a second frame is the other image.

          In either case you need to provide logic of which to choose. It could be proximity to the edge of another clip, the _width of a container type of clip or the Stage.width or just hard coded for specific grid items based on their row and column count positions.