ActionScript 3.0 you say? Because if that`s the case, what
Darr_darshan suggested won`t work, because that`s AS2...
In AS3, you need to create your 'Next' button on the stage,
give it an instance name, so that you can refer to it through
ActionScript, and then type the following code:
// this creates a new Loader instance, which you use to load
.swf, .jpg etc..
var lSwf:Loader = new Loader();
addChild(lSwf); // this is so that the Loader is actually
displayed on the stage
var count:int = 0; // the current .swf index
var maxSwf:int = 10; // the number of .swfs you have...
// this is you 'Next' button to which you assign the
'onNextSwf' function when clicked
bNext.addEventListener(MouseEvent.CLICK, onNextSwf);
function onNextSwf(event:MouseEvent):void {
// the actual loading of the swf, provided you have the swfs
named "yourSwf0.swf", "yourSwf1.swf", ... You will need to name
them based on an index
lSwf.load(new URLRequest("yourSwf" + count + ".swf"));
count++; // so that next time you come click, you jump to the
next swf
// if you reach the end of the swf "slideShow" you jump back
to the beginning
if(count >= maxSwf) {
count = 0;
}
}
I haven`t really tested out this piece of code, I just typed
it in here out of my head, so you`ll have to excuse the possible
mistakes... I hope I have at least pointed you in the right
direction 🙂