# Hand made slideshow - Can anybody help me on this?

**URL:** <https://forum.kirupa.com/t/hand-made-slideshow-can-anybody-help-me-on-this/217032>\
**Category:** flash\
**Created:** [February 22, 2007, 1:39pm UTC](https://forum.kirupa.com/t/hand-made-slideshow-can-anybody-help-me-on-this/217032 "2007-02-22T13:39:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![enginer9](https://avatars.discourse-cdn.com/v4/letter/e/5f9b8f/32.png) [@enginer9](https://forum.kirupa.com/u/enginer9)\
**Post date:** [February 22, 2007, 1:39pm UTC](https://forum.kirupa.com/t/hand-made-slideshow-can-anybody-help-me-on-this/217032/1 "2007-02-22T13:39:35Z")

</div>

Hi everybody.

I’m building a hand made slideshow, in which I need some help.

I not an “ace” in scripting, just a curious designer 😉 , still, with some intermediate knowledge of actionscripting (if this help), and working with Flash 8 pro.

**The problem:**

I already accomplished some of the tasks to this project - based on a full screen XML gallery I found trough web, which already had the connectivity done with the XML doc, I already transformed it into a automatized slideshow adding some functions based on a delay…

**So, in the first frame I have:**

```auto

stop();

// ========= XML ===========
function ldDat() {
    // Loading XML
    dat=new XML();
    dat.ignoreWhite=true;
    dat.onLoad=function(success) {
        if(success) {
            swch(0);
            nextFrame();
        }
    }
    dat.load('images2.xml');
}

// === Switching XML images ===
function swch(id) {
    stb=false;
    tot=dat.childNodes.length;
    if(id>tot-1) {
        id=0;
    }else if(id<0) {
        id=tot-1;
    }
    picMc.ldImg(dat.childNodes[id].attributes.url);
    act=id;
}

// === CALLING FUNCTION ===
ldDat();

```

**In the second frame, this:**

```auto

stop();

// ============= Delay Settings ===============
var time:Number = 3500;

// === FUNCTIONS ===
function proceed() {
    // goes forward one image in the XML
    if(_root.stb) {
        _root.swch(_root.act+1);
    }
}
// delay function
function delay() {
    clearInterval(waitingTime);
    waitingTime = setInterval(proceed, time);
}

// === CALLING FUNCTIONS ===
delay();

```

**And the rest of the actionscripting is for the buttons events:**

```auto

// === BACK BUTTON ACTIONS ===
back_btn.onRelease=function() {
    if(_root.stb) {
        _root.swch(_root.act-1);
    }
    //clearInterval(waitingTime); ??? this seems to be not working
}

// === NEXT BUTTON ACTIONS ===
next_btn.onRelease=function() {
    if(_root.stb) {
        _root.swch(_root.act+1);
    }
    //clearInterval(waitingTime); ??? this seems to be not working
}
// === PAUSE/PLAY TOGGLE BUTTON ACTIONS ===
playPauseSwitch_mc.onRelease=function(){
    if(_root.stb) {
        _root.swch(_root.act+0);
    }
    // === Toggling Play/Pause Symbols within "_root.crt.playPauseSwitch_mc" ===
    if (_root.crt.playPauseSwitch_mc.switchSymbols_mc._currentframe == _root.crt.playPauseSwitch_mc.switchSymbols_mc._totalframes){
        _root.crt.playPauseSwitch_mc.switchSymbols_mc.gotoAndStop(1);
    }else{
        _root.crt.playPauseSwitch_mc.switchSymbols_mc.nextFrame();
    }
}

```

And it’s right here, in the buttons that I’m finding some difficulties giving the right events:

1. I need the “back\_btn” to go back one image “onRelease” and to clear the delay;

2. The “next\_btn” to go next one image “onRelease” and to clear the delay;

3. The Pause/Play toggle button to stop on an image, to clear the delay and to show the “Play” symbol (which is on the “\_root.crt.playPauseSwitch\_mc.switchSymbols\_mc” second frame - in the first is the “Pause”) if clicked once. If clicked the second time it should start from where it stop’s and set the delay again.

Can anybody give me some help on this?  
A great “thank you” in advance.
