Wednesday, September 10, 2008

Fade In Gallery Class

***Can now be found on FlashDen***

Simple yet very useful for a quick setup of a gallery and pretty flexible. With this class it creates a simple effect that reveals your images in sort of the same fashion the Transition Effect. All of the settings re placed into an xml file named "fade_gall_config.xml". The images you want loaded re placed into another xml file named "fade_gall_images". Both these files should be in the same directory as your .swf file. Hope you are all still with me.....

The only function in the FadeInGallery Class is the constructor where you need to pass in the stage. That is pretty much all you need to do on the flash side of things. Here is an example of te syntax for instantiating the class...




import com.clementegomez.media.FadeInGallery;

var gall:FadeInGallery = new FadeInGallery(stage);
addChild(gall);


Check Out the Gallery Here

All of the settings are found in the fade_gall_config file.
Most of the settings are self-explanatory. Here is the xml file as well as the settings that may need more clarification.

sectionDelay : This controls in seconds the delay between the revealing of each section of images. For example; if you have your gallery running horizontally, and your sectionDelay is set to 2. The next row of images wont show until 2 seconds after the previous row is shown. Pretty easy right?


hMultiplier & wMultiplier : These control the vertical and horizontal spacing respectively between the images. These settings will need to be pplyed around with a bit to get the proper spacing you want.


direction : This controls which direction the gallery animates. If you want it to run horizontally then place "horizontal" minus the quotes. Same with vertical instead you place "vertical" minus the quotes.

*NOTE This setting only accepts vertical or horizontal. Any other values will cause the class to throw an error.

-------------------------------------

All the fields must be numbers for the exception of the direction parameter.
-------------------------------------





2


.75


.5


0


1


1


3


.2


.5


.2


2


.9


.1


.1


.7


.7



vetical






Any questions suggestions for future releases can be posted here on the blog. Let me know if you run into an problems or if you find the class useful.


Enjoy


Download FadeInGalleryClass Here

No comments:

Post a Comment