I’ve been working on this image viewer for the last couple of weeks as an assignment for my internship. It’s the first time I’ve looked into and used some OOP programming for this, and it seems to work but I need a lot more practice. This what I came up with:
All of these samples use the exact same .swf file. The only thing that changes are the parameters (flashvars). The settings for the layout are stored in an xml-file (see here). The data for the images can both be passed through as a .txt or a .xml. (But I’m a bit lazy and haven’t typed out a whole xml-file for 40 images to prove it) Inside flash I check the extension and call the correct function to load the data.
Some more details about what it can do:
Set the dimension of the flash movie (content is automatically positioned and scaled within)
Set the colors about almost everything you see
Choose between a scroller or a grid
Set the number of columns and rows for the grid
Set the type of transition that is preferred (4-5 options)
Set a background image for the movie
Set a background color for the different areas
Besides that, the images are preloaded while the image viewer is running (as you can see if you look at the thumbnails). Also, there’s a border around the thumbnail of the image that’s selected and the scroller and grid should keep that thumbnail in sight when it’s selected.
It has an automatic slideshow function that can be paused + the user has the option to go forward an backward to other images. You can set the time that an images is shown, and follow it in the corner with the little clock.
I know it’s not flawless, but it shouldn’t have any major bugs.
I hope you like it
looks pretty nice, I like sample2, I like that transition best. I don’t like the boxes transitions. I know they me be harder to make, but that doesn’t make them better.
when you click on the pic of the purple side panel of the car it screws up the placement on the page. after that all other images loaded are masked wrong.
What sample are you talking about? What do you mean by masked wrong? I can’t seem to find the problem. I know that there’s a flaw in the masking, so I’ll take care of that, but I’m not sure what you mean when you say that all the other images are masked wrong. Ar you sure it’s that particular picture?
yeah I thought about it but I don’t think they’ll agree to that here at the company I made this for. Also, I’m not too proud of the code, it’s a bit messy to my liking. There’s room for a lot of improvement on my part. Maybe in the future.
cool cool…I also like the tweens but want to suggest that when the boxes bring the new image in they also fade out a little quicker and smoother…goog work though.
My initial thought was to fade out the mask, but I had to keep in mind that it should be playable in the oldest possible version of flash. 6 was too old for some of the functions I use, so it’s compatible for Flash Player 7. But fading masks is only possible in 8
Transition 2 is probably te most popular anyway so it wasn’t a priority. There’s also a blur-transition available (commented atm) but that’s also only if it’s published as a flash 8 file. [SIZE=1](Damn the people who don’t have the latest flash player :p)[/SIZE]
I did a little update.
Is the bug still there? What placement are you talking about? The Images are alined to the top of the thumbnail grid and centered in the viewing area.
When you are loading images in the background seems a nice feature but I dont know if everybody might like that… because when you are loading images in background bandwidth is taken up totally… my other things went slow and I was just surpriced for once…
I know, I feel the same about it. It’s a nice feature, but you force people to load a lot more than they even want. If it were op to me I’d dump the preloading of all the images. It’s not up to me though