Movable XML Image Gallery

Category : Flash Views : 29620
Version : 8 Rating
3.1/5 (46 votes)
Type : Text Source File: movable-xml-image-gallery.zip
Result: See the result


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

_root.Frame.Pic.load(images_path[0].attributes.title);
Load the picture for the Frame Movie Clip we already placed on the stage.

for (i = 1; i < _root.images_path.length; i++) {
This for statement will loop the number of paths we have inside "images_path".

duplicateMovieClip(Frame, "Frame" + i, _root.getNextHighestDepth())
Duplicate the frame Movie Clip.

var frame = _root["Frame" + i];
The variable "frame" is set to be the Movie Clip we just created, any changes made on the variable "frame" will be done on the Movie Clip as well.

frame._x = Math.random() * 400 + 20; frame._y = Math.random() * 20 – 40;
Set the starting position for the Movie Clip using the "frame" variable. The frame is placed above the screen because we coded the Movie Clip to move to a destination inside the screen.

frame.imagePath = _root.images_path[i].attributes.title; } }
Here we set the "imagePath" variable to the attribute "title" of the node "i" inside the images_path array.

Then the Movie Clip will load the image using this variable.


del.icio.us digg it Reddit Stumble Upon Technorati

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




Supporters

Reseller Web Hosting