this is simple gallery example for AS2
gallery is nothing special, ease to use and implement
interesting thing about this example is that you pass a folder, and PHP side gathers image list from a folder and returns it to the Flash in XML form together with images widths and height which makes it more easier to implement this sort of galleries like I’ve made
so from this example you can see :
- PHP serving XML to Flash
- PHP getting image size (width and height)
- Flash loading XML
- Flash creating elements on stage using library
- loading external images
- and more…
this example is for beginner level
example : http://www.hagane.us/as/gallery/
ZIP : http://www.hagane.us/as/gallery/gallery.zip
if you have any questions about PHP or Flash side please post it here
EDIT: sorry for wrong links and config. Everything is corrected now and fully functional
thanks people who noted me about errors!












36 responses so far ↓
Beedigital // January 8, 2008 at 9:38 pm |
The links for the example & source are not working….
simply_accessible // January 8, 2008 at 10:44 pm |
Does such a thing exist? both example and ZIP are broken-links.
Oleg // January 8, 2008 at 11:28 pm |
Check the links in your example – it’s pointed to localhost
MrSteel // January 9, 2008 at 12:03 am |
yep, me feel stupid :d
anyway till I get home people can use
http://www.hagane.us/as/gallery/gallery.swf?imageFolder=./images&xmlPath=./PHP/getimages.php
David Sikma // January 9, 2008 at 6:37 am |
Wow thanks! I’ve been displaying my images in a very similar way but this is a much easier to build and maintain a site. What would the be the simplest way to ad a link to the top of the page? Link on top of my current site.
Beebs // January 10, 2008 at 6:21 am |
MrSteel,
I really like this gallery. Unfortunately my server does not have PHP. Can you please help me to provide the XML version only? Can you please give me ahint for the xml file structure for the start?
Thanks a lot
mrsteel // January 10, 2008 at 2:32 pm |
Yes, You can create XML by yourself
and pass xmlPath parameter through flashvars in index.html (as I pass php location)
structure of XML you can see at
http://www.hagane.us/as/gallery/PHP/getimages.php
mrsteel // January 10, 2008 at 2:36 pm |
@David and all :
yes you’re site could definitly use this gallery
you can add anything you want into the FLA file (logos, contant links …) and recompile it and use it on your site
Beebs // January 10, 2008 at 9:36 pm |
Thanks a lot for repply Mr.Steel. I really appreciate it.
I have further question/request :
With the XML version, How possible to check the width and the height through Actionscript dynamically – so that the width and height property does not need to be listed in the XML file?
Thanks again.
mrsteel // January 11, 2008 at 2:38 am |
it’s not possible with AS2 version
that’s why PHP jumps in
AS2 only knows image size when it’s loaded
srinivas // January 28, 2008 at 10:08 pm |
Thanks for good stuf with php..
I want one help I have flash file that reads data from php and builts a link .
by clicking this link can we get flash pop up window?? pls help ??
mrsteel // January 29, 2008 at 9:19 pm |
please
send me description of your problem, together with sources to my email at yahoo
putrefactive [at] yahoo [dot] com
srinivas // January 31, 2008 at 2:08 pm |
thanks for responce
kathir // March 7, 2008 at 5:28 am |
i want to print a special char in flash through php ?
how can i do it?
colin // May 30, 2008 at 2:38 am |
the source file is not workable
mrsteel // May 30, 2008 at 2:46 am |
you need flash cs3 anyway I will send you flash 8 version
Free Flash Applications :Image Galeries, FLV Players, MP3 Players | Flex Tech // June 9, 2008 at 8:02 pm |
[...] Cyberspace Nova [...]
Simon B // June 23, 2008 at 11:03 am |
Thanks for a Flash gallery simple enough for me to understand and alter bits. Going acrzy looking for where to alter the size and colour of the borders around the images though… Can you point me to the right bit? cheers
virtuoosi // July 28, 2008 at 4:53 am |
thanks, its simple and just what i was looking for
Bing // August 16, 2008 at 12:12 pm |
I have implemented your flash on my site. Just wonder what other options that I can use. I am looking for options to load the image, starting from the left instead of the center. Also, want to see if there is an option to show file name. Thx
Christian Web Design Resources » Blog Archive » Free Flash Resources // August 29, 2008 at 2:32 am |
[...] Cyberspace Nova [...]
Free Flash Resources | Christian Web Design Tutorials // August 29, 2008 at 4:13 am |
[...] Cyberspace Nova [...]
mrsteel // August 29, 2008 at 10:31 am |
I will probably do another gallery with few other options but built in AS3…
Free Flash Resources | Christian Web Design Blog // September 3, 2008 at 6:10 am |
[...] Cyberspace Nova [...]
Dwaine // January 6, 2009 at 8:29 am |
hello,
i need to have different folders for different galleries, ie, not all images will be in the images folder?
Where should I change the images folder variable, cant seem to change it correctly!
Please help!
Ücretsiz Resim Galerileri Üzerine Bir İnceleme | Away4m // January 11, 2009 at 10:18 pm |
[...] Cyberspace Nova – As 2 için hazırlanmış Php yardımıyla mevcut klasördeki resimlerden xml tabanlı galeri oluşturan güzel bir çalışma [...]
saugat // January 13, 2009 at 10:07 pm |
I want to build up a xml base photo gallery.
I want some help.
I have a sample i want to make some change on it
kzorg // February 19, 2009 at 2:04 am |
The source .fla has graphics for next and previous buttons included. Is there a way to enable them?
keyon // March 26, 2009 at 4:53 pm |
I need so help i have this code it works a little,
the only problem with it is that when i try to place the code and images in a MClip to place it on the Stage. it does not work please help
all i need is a good working image scroll gallery for AS2 with no xml
panel.onRollOver = panelOver;
function panelOver() {
this.onEnterFrame = scrollPanel;
delete this.onRollOver;
}
var b = stroke.getBounds(_root);
function scrollPanel() {
if(_xmouseb.xMax || _ymouseb.yMax) {
this.onRollOver = panelOver;
delete this.onEnterFrame;
}
if(panel._x >= 89) {
panel._x = 89;
}
if(panel._x <= -751) {
panel._x = -751;
}
var xdist = _xmouse – 400;
panel._x += Math.round(-xdist / 7);
}
Brick // May 16, 2009 at 8:08 pm |
Nice article, Thanks for sharing
Felipe // June 16, 2009 at 2:01 am |
Please, help me.
How I can change the width/height of the image?
I need to do this in a site, but I don’t know AS very well.
If someone explains to me, shows an example too.
Thank you a lot!
mrsteel // June 16, 2009 at 3:22 pm |
change width /height of which image?
this gallery automatically takes width and height of image in folder and bring it through XML to Flash …
Reiki // July 1, 2009 at 5:18 pm |
Excellent information. Finding a few such solutions has taken hours in the past.
Thank u.
Philip // August 7, 2009 at 2:28 am |
Mr Steel, this is awesome! I just have one problem; When i place this inside a movieclip TempMC seem to get the right width and height but it does not load the images. Do you have a solution to this? I would realy appreciate it!
Philip // August 7, 2009 at 7:27 am |
Never mind, it’s all solved!
excel help // August 28, 2009 at 5:50 pm |
This is really beautiful. Inspiration by the design literally!