Super newbie with a newbie question

Hey guys… I’m a graphic designer and have started teachin myself flash…

I have a question about movie clip navigation… basically I have a page… one section is for work examples… it is labeled work in the main timeline… there are 4 different sections (logo, layout, ad egs etc) in the work section… again labelled on the main timeline, with buttons navigating to each corresponding movie clip… all labeled accordingly

in the work section on the main page there are forward and back buttons to navigate the movie clips through the frames to show the different images… much like a photo slideshow preset in flash…

the code for which looks like this… (for the adscontent movieclip and “ads” frame label on main timeline)

stop();

import flash.events.MouseEvent;

mc_adscontent.stop();
adsprev_btn.addEventListener(MouseEvent.CLICK, goBackads);
adsnext_btn.addEventListener(MouseEvent.CLICK, goForwardads);

function goBackads(event:MouseEvent):void {
mc_adscontent.prevFrame();
}

function goForwardads(event:MouseEvent):void {
mc_adscontent.nextFrame();
}

[QUOTE=crush710;2345032]Hey guys… I’m a graphic designer and have started teachin myself flash…

I have a question about movie clip navigation… basically I have a page… one section is for work examples… it is labeled work in the main timeline… there are 4 different sections (logo, layout, ad egs etc) in the work section… again labelled on the main timeline, with buttons navigating to each corresponding movie clip… all labeled accordingly

in the work section on the main page there are forward and back buttons to navigate the movie clips through the frames to show the different images… much like a photo slideshow preset in flash…

the code for which looks like this… (for the adscontent movieclip and “ads” frame label on main timeline)

stop();

import flash.events.MouseEvent;

mc_adscontent.stop();
adsprev_btn.addEventListener(MouseEvent.CLICK, goBackads);
adsnext_btn.addEventListener(MouseEvent.CLICK, goForwardads);

function goBackads(event:MouseEvent):void {
mc_adscontent.prevFrame();
}

function goForwardads(event:MouseEvent):void {
mc_adscontent.nextFrame();
}[/QUOTE]

so my question is

Right now the next and back button navigate the adscontent movie clip as needed… but…
I need for the adsprev_btn to return the main timeline to the “work” section when it is pressed if it is at frame 1 of the adscontent movie clip… so the back button returns you to the work section

I guess it is going to be an if else statement but am a little lost… i guess if it is on frame one then return to work else prev.Frame?

Thanks for your help!