Need help in debugging a slideshow

I 'm trying to write a slideshow in AS2, but once I click the Pause button… sth wrong… It can’t be play again(it can pause the slideshow). Many thanks.

here’re the code.

import com.greensock.*;
import com.greensock.easing.*;



for (var i:Number = 1; i <= 3; i++)
{
	attachMovie("photo" + i,"image" + i,2 + i);
	this["image" + i]._visible = false;
}

this["image" + 1]._visible = true;
this["image" + 1]._alpha=0;
TweenLite.to(image1, .5, {_alpha:100, ease:Circ.easeOut});


var nCurrent:Number = 1;

next_btn.onRelease = function()
{

//	trace(this._parent["image" + nCurrent ])
	timer = 0;
	TweenLite.to(this._parent["image" + nCurrent], .5, {_alpha:0, ease:Circ.easeOut, onComplete: disablephoto, onCompleteParams:[this._parent["image" + nCurrent]]});	
	//this._parent["image" + nCurrent]._visible = false;
	nCurrent++;
	if (nCurrent > 3)
	{
		nCurrent = 1;

	}
	this._parent["image" + nCurrent]._visible = true;
	this._parent["image" + nCurrent]._alpha =0 ;
	TweenLite.to(this._parent["image" + nCurrent], .5, {_alpha:100, ease:Circ.easeOut});
};

function disablephoto(target:MovieClip) {
	target._visible = false;
}

var timer:Number = 0;
this.onEnterFrame = autoRun;
//delete this.onEnterFrame

var isAuto:Boolean = true;

pause_mc.onRelease = function(){
	
	
if (isAuto==true) {
	this.gotoAndPlay(2);
	delete this._parent.onEnterFrame;
	trace("pause")
	} 
	

else{
		this.gotoAndPlay(1);
		this._parent.onEnterFrame=autoRun;
		
		}

}


function autoRun()
{
	timer++;
	trace(timer);
	if (timer == 3 * 24)
	{

		pic();
		timer = 0;
	}

};

prev_btn.onRelease = function()
{

	
	
	//trace(this._parent["image" + nCurrent ])
	timer = 0;
	TweenLite.to(this._parent["image" + nCurrent], .5, {_alpha:0, ease:Circ.easeOut, onComplete: disablephoto, onCompleteParams:[this._parent["image" + nCurrent]]});	
	//this._parent["image" + nCurrent]._visible = false;
	nCurrent--;
	if (nCurrent < 1)
	{
		nCurrent = 3;

	}
	this._parent["image" + nCurrent]._visible = true;
	this._parent["image" + nCurrent]._alpha =0 ;
	TweenLite.to(this._parent["image" + nCurrent], .5, {_alpha:100, ease:Circ.easeOut});
};



function pic()
{
	
	//trace(this._parent["image" + nCurrent ])
	TweenLite.to(this["image" + nCurrent], .5, {_alpha:0, ease:Circ.easeOut, onComplete: disablephoto, onCompleteParams:[this._parent["image" + nCurrent]]});	
	//this._parent["image" + nCurrent]._visible = false;
	nCurrent++;
	if (nCurrent > 3)
	{
		nCurrent = 1;

	}
	this["image" + nCurrent]._visible = true;
	this["image" + nCurrent]._alpha =0 ;
	TweenLite.to(this["image" + nCurrent], .5, {_alpha:100, ease:Circ.easeOut});
	
	
	
}

no source + no indication of what gets traced out + no indication of what you’ve tried to fix it = this

I don’t have the answer to your question, but was wondering: why don’t you use AS3?

Anyone can help out ? I really in need. Thanks so much.

Hi EastCoast,

I have posted my question at the very beginning. What do u mean by no source?
I have attached the script. Please read carefully. Thanks.

Hi guido2004,

I don’t think I can use AS 3 in the meantime, as I have to linked up w/ other swf files in AS2. As I may not have access to the rest of the source files, I guess I have to stick w/ AS 2 this time. Please tell me if I 'm wrong. Do u have suggestion ? Thanks ~