Slideshow Component AS2
Actionscript 2, Flash Components December 18th, 2007Slideshow Component AS2 is a free flash component that allows you to create slide shows in no time. All you need is an XML file which contains the path to each image. You can also include in the XML file the transition effect for each image.
The Slideshow has 10 transition effects: fade, blur, brightness, pixel dissolve, threshold, squares, pixelate, explode, fly and noise. There are 2 built-in graphic preloaders (bar, circular) and a built-in text preloader. The component also allows you to set a border for the image, giving you the possibility of setting the border’s thickness, alpha and color.
There are many other customizable properties. For more information check out the preview and see the component’s documentation.
If you have any questions, fell free to ask.
Requirements
Authoring: Flash 8, Flash CS3
Actionscript: Actionscript 2 (Actionscript 3 version available here)
Player: Flash Player 8, Flash Player 9
Download Slideshow Component AS2
Documentation for this component is available here.
May 1st, 2008 at 9:30 am
Just wondering, if it is possible to add some kind of smoothing to the images loaded? Cause if I run the Flash in fullscreen mode with scaling on, then the images in slideshow looks terribly aliased.
May 2nd, 2008 at 2:56 pm
Unfortunately, there is no smoothing option.
May 25th, 2008 at 11:38 pm
I found out a nice way to smooth externally loaded images. I might help you incorporating in your component : http://www.frontend-multimedia.com/smoothImageLoader/
May 25th, 2008 at 11:38 pm
Oopps… I meant, “It” might help you incorporating smoothing option in your component.
May 26th, 2008 at 3:54 pm
Thanks for the tip :)
May 27th, 2008 at 11:29 pm
Hi there,
had a play with the gallery and the scroller…awesome combination if somebody is looking for something simple and sleek :D
Was wondering if there is a possibility to have a button that says ‘start slideshow’ and one ‘stop slideshow’…I tried to figure that out reading the docu but I couldn’t find anything.
May 28th, 2008 at 5:47 pm
Hi,
There is no built-in method to start or stop the slideshow but you could do this using setInterval:
var myInterval = setInterval(myFunction, 1000);function myFunction(){
mySlideshow.nextImage();
}
To stop the slideshow you would just call
clearInterval(myInterval);However, for everything to run as intended a few extra lines of code need to be added. Here is the complete source code: http://flashotaku.com/files/autoslideshow_as2.zip
May 29th, 2008 at 7:23 am
You’re my man…that works soooo well and is so easy to setup! Works a treat. Thx :D
I’m actually trying to get my hands on a PHP-script that would to the uploading and putting out of the xml-file. Will get in contact with you once I found a solution ;)
June 20th, 2008 at 11:08 am
Thanks for this great component…I have been able to customise it to do exactly what I want but there is one thing I cant figure out. How do i highlight a button so a user knows what picture or number he/she is viewing. What about implementing the timer function and autoplay + loop
June 20th, 2008 at 1:00 pm
Sorry for all these questions but is there a way to have the numbers generate dynamically based on how many pictures are in the image folder?
June 20th, 2008 at 1:39 pm
Hi Charles,
1. Here’s a similar AS3 example to what you need http://flashotaku.com/files/gallery_ex6_as3.zip
2. If you want to know how many files a folder has, you would need to use PHP
June 24th, 2008 at 8:31 am
Hi again,
Its very difficult for me to customise the file u sent me since I dont plan on using thumbnails but buttons from the library instead. Is there a way I can send u the fla so u can take a look at it?
I also cant implement the auto play with the time interval
Thanks a million for all the hrlp
June 24th, 2008 at 11:04 am
You can send me the file at flashotaku [at] gmail [dot] com
July 24th, 2008 at 10:05 am
Hey,
I finally found the solution ! on apple mac OSX; there are 2 different folders for flash components : one in the library folder and one directly in the flash setup folder. Flash only cares about the last one. But when you use the .mxp setup, it puts components in the library components folder ! so in the wrong folder…
apple’s sometimes weird…
nevertheless thanks for your answers and for your work
July 24th, 2008 at 10:06 am
sorry I’ve posted in the wrong chat…
July 24th, 2008 at 12:32 pm
Thanks for posting your solution, jc. It could be very helpful for people who encounter this problem.
September 23rd, 2008 at 9:23 pm
Dear Flash Otaku, Thx for your freebie AS2 slideshow component its just what I was looking for.. I am however a bit of a beginner in XML, could it be possible to have the sample file for it (.fla) ? Its just that for some reason once Ive set up everything, when I do a test I cant get past image 1 ! All it shows is all the nice transitions for this first image, even though on my images.xml file I have 3 images! Do I have to actionscript a lot? For some reason I thought it would be ‘automatic’ like slideshow pro – but it only ‘precieves’ the first image… Sorry if I sound too amateurish :) THANX…. G
September 23rd, 2008 at 9:36 pm
Hi! Me again.. Dont know if you still monitor this website, but in case you do reply, just wanted to let you know that I downloaded the 2 .zip files with samples you gave to other users on the thread, but my Flash refused to open them :( I use Flash 8 on a Mac… THX!
September 24th, 2008 at 12:52 pm
Hi Greta,
Tell me exactly which FLA files do you need and I’ll save them for Flash 8. Most of the files I’ve uploaded are saved for Flash CS3.
September 24th, 2008 at 3:15 pm
Sweet of you to reply thx, especially since I know AS2 isn’t really in ‘fashion’ so much anymore! But thats what I got lol :)) Basically I just wanted to see (as an amateur actionscripter!) how you implemented general scripting for the AS2 Transition Slideshow component! The XML part seems 100% correct (I checked against a zipped file of yours) – BUT my test files just seem to ‘pull’ my first image (and all the transitions run correctly on only that same image) even though I have more than one img – so Im mystified about this, I could hardly get to sleep last night thinking why I couldn’t work it out :-P
Regards 2 u!
G
September 24th, 2008 at 5:02 pm
Well, the component doesn’t have a built-in feature to automatically loop through the images but you can use the component’s API to easily create this.
There are 3 methods used for navigation: nextImage(), prevImage() and loadImage(i).
So, if you want to create something like an automatic slideshow, you would need continually call the nextImage() method at a certain interval.
this simple example will call nextImage() every 5 seconds
var interval:Number = setInterval(callMe, 5000);
function callMe()
{
mySlideshow.nextImage();
}
Here is a working example for Flash 8: http://flashotaku.com/files/auto_slideshow2_as2.zip
September 25th, 2008 at 4:11 pm
Dear FlashOtaku,
Thanks for this and thanks ever so much for sharing your techie brilliance with yours truly and with the audience – you really are an example to follow and v. proffessional. I LOVE your work! Respect and thanks again.
May you have a lovely day :-D
A big fan,
Greta
September 25th, 2008 at 5:54 pm
Thank you for your nice words. :)
January 21st, 2009 at 11:24 am
Awesome script.
Is there any way I can check whether the “masking animation” is finished on each picture ?
I need to know cause I need some events fired after each image is being displayed in full.
thanx
January 21st, 2009 at 12:48 pm
Yes, you can listen for the ‘transitionComplete’ event.
var transitionCompleteObject:Object = new Object();
mySlideshow.addEventListener(“transitionComplete”, transitionCompleteObject);
transitionCompleteObject.transitionComplete = function(evt:Object)
{
trace(“transition is complete”);
}
You can find the documentation here.
March 11th, 2009 at 12:57 pm
[...] « Slideshow Component AS2 Slideshow Component AS2 Documentation [...]
May 20th, 2009 at 2:25 am
Awesome component FlashOtaku!
I was in the middle of writing my own slideshow when I stumbled upon your image viewer. I added your component to my flash and added some extra code to interface with it to act as a slideshow and set the many options from an external XML. The transitions are awesome and it’s so easy to work with! Very solid! Thanks!
May 20th, 2009 at 11:28 am
I’m glad you like the component. :)
Hope you’ll enjoy using it.
June 8th, 2009 at 8:23 pm
This is so helpful! I want to combine your autoslide show (auto_slideshow2_as2.zip) you provided with the original slideshow so that it autoplays but I also have the option of using the “next”, “previous” or number buttons to change the images. Any thoughts?
June 9th, 2009 at 11:58 am
Hi sj,
The code you need to add is similar to the AS3 version.
next.onRelease = function()
{
clearInterval(myInterval);
mySlideshow.nextImage();
}
And the same for the ‘previous’ button.