Flash menu to control IFRAME

(Follow-up on earlier (deleted) thread)

I want to scroll through pages in an IFRAME
in a HTML page with my Flash menu.

It works partly but it doesn’t go back and forth
correctly. This is the code I have now:

myUrl = 1;
btn1.onPress = function() {
    if (myUrl<4) {
        getURL("page"+myUrl+".html", "home");
        myUrl++;
        input = myUrl;
    }
};
btn2.onPress = function() {
    if (myUrl>0 ) {
        getURL("page"+myUrl+".html", "home");
        myUrl--;
        input = myUrl;
    }
};

Does anyone know how to do this correctly?
example:here

thanks

[COLOR=Red]+++MODS I ACCIDENTLY POSTED WRONG! SHOULD BE IN AS FORUM!+++[/COLOR]