Example:
First Of All
Open Swishmax 2, 3 or 4 and set the movie properties as follows width = 527 Height = 410 Frame rate = 25 swf export = swf8

Step.1
insert 2 empty movieclips one at the top of the stage named thumbnails and the other center stage named loader.
On Scene_1 place the following code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | onFrame (1) { myPhoto = new XML(); myPhoto.ignoreWhite = true; myPhoto.onLoad = function(success) { numimages = this.firstChild.childNodes.length; spacing = 70; for (i=0; i<numimages; i++) { this.picHolder = this.firstChild.childNodes[i]; this.thumbHolder = thumbnails.createEmptyMovieClip("thumbnail"+i, i); this.thumbHolder._x = i*spacing; this.thumbLoader = this.thumbHolder.createEmptyMovieClip("thumbnail_image", 0); this.thumbLoader.loadMovie(this.picHolder.attributes.thmb); this.thumbHolder.title = this.picHolder.attributes.title; this.thumbHolder.main = this.picHolder.attributes.main; this.thumbHolder.onRelease = function() { loader.loadMovie(this.main); title_txt.text = this.title; marker._x=this._x+27; marker._y=this._y+9; }; } }; myPhoto.load("xmlphoto.xml"); } |
Step.2
using the Rectangle tool make a small rectangle select it as a target and name it marker place it off stage.


now do the same again create a small square / rectangle and name it shaddow i have had a solid white fill colour this time and no outline. place this off stage.


Step.3
Open a text editor like Notepad and place the following xml code into it and save as xmlphoto.xml
1 2 3 4 5 6 7 8 9 | <gallery> <img title="Photo Name Here" alt="" /> <img title="Photo Name Here" alt="" /> <img title="Photo Name Here" alt="" /> <img title="Photo Name Here" alt="" /> <img title="Photo Name Here" alt="" /> <img title="Photo Name Here" alt="" /> <img title="Photo Name Here" alt="" /> </gallery> |
make sure everything is in the same folder export the movie swf & html and test.
you can purchase the tutorials files if you wish for Swishmax 4
Price £3.00





3 comments
Craig Lowe
May 7, 2011 at 9:38 am (UTC 1) Link to this comment
if you are looking for a photo gallery that will realy make life simple.
take a look at my free swishmax 4 slideshow component.
Simple Slidesho v1 Swishmax 4 component
Or
Simple Slidesho v2 Swishmax 4 component
jorgeica
June 28, 2011 at 4:35 am (UTC 1) Link to this comment
Hello, very nice tutorial,
I buy it, thanks
Question, as I make small images are 20?.
means leaving in 2 rows.
thanks and sorry for the translation, my mail is ica_soft@hotmail.com
Craig Lowe
June 28, 2011 at 7:38 am (UTC 1) Link to this comment
yes could do 2 rows or you could add images into a small thumbnail scroller.
have you looked at my slideshow component for swishmax 4
http://www.swish-designs.co.uk/blog/?p=3464