• Home
  • Free Tutorials
  • Free Video Tutorials

Adobe Photoshop
Autodesk 3ds Max
CSS
Flash
Help Center Live
iPhone
Joomla
Make Money Online!
Mambo
mIRC
Outlook Express
SEO / SEM
Simple Machine Forum
Target Explorer

XML Image Gallery with Falling Pictures (Snow Effect)

Category : Flash Views : 33662
Version : 8 Rating : 
3.7/5 (62 votes)
  • Currently 3.69/5
  • 1
  • 2
  • 3
  • 4
  • 5
Type : Text Source File: xml-image-gallery-with-falling-pictures.zip
Result: See the result


Previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | Next

The images will be loaded and fall randomly until the user clicks one of these images.
Free Flash Tutorials, XML Image Gallery. Falling Pictures Image Gallery (Snow Style)

Then the image clicked will enlarge and center on the screen. If the user clicks on another image or outside the enlarged picture, this picture will go back to its original size and continue falling.
Free Flash Tutorials, XML Image Gallery. Falling Pictures Image Gallery (Snow Style)

The first thing to do here is to load our XML file with the paths to the images; so create an XML file like this one:
<xml> <images> <image1 title = "0.jpg" /> <image2 title = "1.jpg" /> <image3 title = "2.jpg" /> <image4 title = "3.jpg" /> </images> </xml>

Put as many nodes as you want inside , the attribute "title" is the path to your images.
I have the images ready and saved the XML to "images.xml". Both XML and images need to be in the same folder of your flash file.

Open you flash file and set the size of the stage to 800x500, that's the size we will be using, then open the actions for the first frame in the stage and paste:
//Import libraries for the BitmapData and Matrix objects import flash.display.BitmapData; import flash.geom.Matrix //Create XML object var image_xml = new XML(); //Set the ignoreWhite property to false image_xml.ignoreWhite = true; //Load the XML file "images.xml" image_xml.load("images.xml") //Array to store the paths to our images when we take them from the XML var images_path = new Array(); //This is a variable we are going to use to keep track of how many images frames we have frames = 0; //Later we will write a code to know if all images loaded, if they did we set this variable to true ready = false;

Now before we write the Event Handler for the XML to get the paths to the images we need to make our Frame MC, just create a new MC and draw a frame anyway you want it:
Free Flash Tutorials, XML Image Gallery. Falling Pictures Image Gallery (Snow Style)


del.icio.us digg it Reddit Stumble Upon Technorati

Previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | Next
How to Video Tutorials on software by Helpvids.com

Video tutorial: Forex trading



Sponsors



Advertisement









Studio | Advertisement | About Webzo | Contact Webzo | Terms of Use | Free Video Tutorials by Helpivds

Copyright © 2007 NR Concepts Ltd. All rights reserved.