Discussion Area

ask questions, discuss topics, solve problems

This is a public Discussion Area  publicRSS

Post

    • Help with Dynamic Images Positions
      Thread posted 12/10/08 by badinha
      813 Views, 10 Comments
      Title:
      Help with Dynamic Images Positions
      Content:

      Hey dudes, first of all, congratz for the adobe group.

      Now i need some help :)
      I need to do something like that:

      I Have a full square bigger than visible area, about 5000x5000 pxs, and i need fill that with images, with random sizes, i do a little exemple, i wish it can help to find the solution:

      And i need this for all images, find a clear position fit the image, and place that in this space.

      Someone can help me with this?

      Image:

      Be the first to rate this Post

      |

      Sign in to rate this Post

    Comments

    • You might want to look at Jared Tarbell's experiments:

      http://levitated.net/daily/levEmotionFractal.html

      http://levitated.net/daily/levBoxFitting.html

    • Dude! Thankz a lot!

      I very apreciated! I porting the AS2 levBoxFitting class to AS3! As soon is ready i show to you!

    • Dude, i porting the class, but i think this is not exactly what i need =/

      becouse in the case of lvlBoxFitting, the box has not a specific size, this just keep growing until collide with another object! I need test this before put in the exactly place =/

      You have any other idea?

      ps. Sry about my very bad english!

    • Well - the idea is that you use the principle to first build your layout hidden from view. Then when you have a list of the sizes + coordinates you actually show the build up animation. The problem with what you want to achive is that if you want to find the perfect solution it will take an almost infinite time. So you can only find a so-so solution within a reasonable time. With "solution" I mean a possible layout which fills the given area with the images you provide.

    • Yes, i think the levEmotionFractal, help me better for the solution i need, becouse he fit the exactly space, and i think is the best solution for what i need..

      i keep work here, any other questions i ask here for help!

      Thanks Mario!

    • Hum... i try work with this examples, but both of then dont work for me... becouse the images allready have the size set. The logic i try is something like that:

       - Load XMl with Imagens parameters
       - Create a Image Object
       - Set Width / Heigth and others properties
       - After Image Loaded, find in the grid (5000 x 5000), one slot with the image size;
       - if finded, save the grid with the slot i used,
       - Load Next Image
       - Find another slot in the grid, without hit another image, and place the new image

      Can undersand? In 2 examples above, they fit in the scale he need, and not the scale this need to be =/

      Some other idea?

    • I found a good example:
      adobe.com/flashon

      But my problem is, the images not have the same size, proportion.

      =/

    • If the images have to have an exact pixel size and not just the correct proportions you have a problem. Or rather a very difficult calculation that will take very long to render. I think you better change your requirements and don't insist on exact image sizes.

    • Yeah... i think is inviable.
      My ideia is just make a TagCloud with images. More points the picture earn, more is the size of then. But i think not work =/
      I keep work, i try to make something like flashOn, with the same images proportions.

      if u have another ideia i apreciate, and thanks for all the help!

    • In that case you will not have to be 100% exact. I would use the grow-boxes approach and add images from biggest to smallest. So the big images will still have enough free space to grow in whilst the smaller ones will have to do with the space that is left.