How would I limit the number of columns with the effect you have shown?
First, you should change all the instances of rowCount to colCount. I don't know why I called it rowCount, it's actually the columns. With that, I think, you should probably be able to figure it out. The name doesn't really matter but it's good to maintain clean, semantic code.
You'll find this line in the code:
Code:
var rowCount = Math.ceil(Stage.width/(imgWidth + imgBorder)); // Number of items in one row
You can just change that computation and hard code a number.
- or -
When you're embedding the Flash in the HTML page, just limit the width of the div that it's in. If you're using the same embed dimensions that I am in my example, the width of the flash will be 100% of it's container. So if you only want a three column display, just change the width to 300px (assuming you have no spacing between the images like I do).
How to get rid of the white border around the images?
Umm...
Code:
var imgBorder:Number = 1; // Border between images
I see why you're probably confused. I didn't use the variable for the vertical borders.
In the Movie Configuration section, add this:
Code:
var imgWidth:Number = 100; // Width of the images
var imgHeight:Number = 100; // Height of the images
var imgBorder:Number = 1; // Border between images
Change the "Create New Row" conditional statement to this:
Code:
if (count == rowCount-1) {
count = -1;
yPos += imgHeight + imgBorder;
}
That should fix it for you
If you don't mind, can I email or pvt msg you a link to my site for you to look at? I would love to get your opinion. I'm not ready for full relase so I will not post it here.
Sure, you can email or PM me through the forums.
Bookmarks