1 Reply Latest reply on Mar 10, 2008 5:16 AM by kcell

    Placing images in a for loop

    batuj
      Hi everyone, I'm new to both Flex and this forum and I've a question :)

      I'm trying to make dynamic map, consisting of different images. Also this map will be dynamic and randomized. Because it will be randomized, repeater doesn't help me much in this situation.

      I need to combine different images in a specific count for both horizontal and vertical sides at the map.

      Also may I able to create code and embed it to rest of the page at script side of flex like in PHP or JSP ?

      Thanks for paying attention..
        • 1. Re: Placing images in a for loop
          kcell Level 2
          Hi batuj,

          welcome to the forum.

          Never done this before, but I will try to give you an idea of an approach with use AS3.

          I would recoment to make a new class imagemap, which extends from canvas.The imagemap class would have some set/get methods to set the information of the 2 dimensional arrays. (
          For every row of the array, the imagemap can have a hbox where each image can be displayed as a child inside the hbox. ( you may also can make a new class, which extends hbox and some set/get methods for row information, so every hbox which row it displays.

          Thats for some basic ideas. You didn´t say how the information of the 2 dimension array should came from so I cannot make any suggestions here.

          I think there may also be some approaches for imagemaps somewhere on the net, which should give you a better start for your idea.
          ( link ImageMap from the Flexlib )

          best regards,
          kcell