Can anyone please help me with this script?

Hi There
I am a newbie ActionScripter and have run into an impasse in a project I am working on. I hope that one of you Super Coders out there can help me with this problem. I am all about trying to figure out the whole mechanics of the thing but I am basically resorting to shots in the dark now. Can anyone out there help? I would greatly appreciate it.
Thanks.

The story so far…

Basically I am trying to make a movie clip viewer that plays series of loaded swfs on the main stage Normally I would just make a series of keyframes but I was trying to ultimately streamline the process should down the road I need to show a bunch of swfs and would rather not have to make a bazillion keyframes and then have a frame in the middle of everything screw up. I would just like to change the total number of loaded movies dynamically.

I have a nav bar that has three buttons (“play_mc”, “back2_mc” and “replay_mc”) and a dynamic text field (“showCount_txt”) that indicates what “frame.swf” you are viewing out of a total number (ie 1/5, 2/5, 3/5 etc)

Now with the buttons I would like the following to happen:
each button either loads and unloads a swf into an empty clip on the stage named “container_1_mc”
changes the number in the “showCount_txt” dynamic text box
changes the name of the next swf to be loaded into the “container_1_mc”
turns itself off if not needed (like the play button turns off when it reaches the last swf)

In order to accomplish this task I assigned the following actions to the buttons (or at least think I did since the script doesn’t work)

The Cast of Characters:

play_mc (plays the next movie)
unloads the current swf in the container clip
changes the showCount_txt by 1
makes the “back2_mc” active
makes the “replay_mc” active
changes the title of the loaded swf
loads the next renamed swf into the “container_1_mc”
goes inactive after the total amount of swfs have played

back2_mc (plays the previous movie)
unloads the current swf in the container clip
subtracts 1 from the showCount_txt
changes the title of the loaded swf to that of the previous one
loads the renamed swf into the “container_1_mc”
goes inactive after the very first swf is loaded

replay_mc (goes back to the first movie)
unloads the current swf in the container clip
resets the showCount_txt
loads the first swf
turns off the back2_mc
then goes inactive

The Problem:
I kind of suck at this…and
Neither the Back button or the Replay button work.
When things “reset” the buttons stop working and won’t make the text box change or rename the swf. Somehow I suspect turning the buttons on and off has something to do with it but I’m at a loss to understand why.

and this what I wrote to make the magic happens… (or NOT HAPPEN as is the case)

first frame:

stop();
var frameNum = 1;
// total number of frames
var totalNum = 5;
_root.play_mc.gotoAndStop(“on”);
_root.showCount_txt.text = frameNum+" / "+totalNum;
container_1_mc.loadMovie(“frame1.swf”);

_root.play_mc.next_btn.onRelease = function() {
_root.back2_mc.gotoAndStop(“on”);
_root.replay_mc.gotoAndStop(“on”);
container_1_mc.unLoadMovie();
frameNum++;
if (frameNum == totalNum) {
_root.play_mc.gotoAndStop(“off”);
}
_root.showCount_txt.text = frameNum+" / “+totalNum;
container_1_mc.loadMovie(“frame”+frameNum+”.swf");
};
_root.back2_mc.next_btn.onRelease = function() {
container_1_mc.unLoadMovie();
frameNum–;
if (frameNum == 1) {
_root.back2_mc.gotoAndStop(“off”);
_root.play_mc.gotoAndStop(“on”);
}
_root.showCount_txt.text = frameNum+" / “+totalNum;
container_1_mc.loadMovie(“frame”+frameNum+”.swf");
};
_root.replay_mc.onRelease = function() {
container_1_mc.unLoadMovie();
container_1_mc.loadMovie(“frame1.swf”);
};