Using back button in flash "like a browser back button"

hey all/reef,

basically this code will work like a browser back button its very simple but “could end up very long” basically it will act “similiar to the browser back button”

on (release) {
    if(page1 = _currentframe){
        _root.gotoAndStop("quiz");
    } else if (page0 = _currentframe){
        _root.gotoAndStop("register");
    } else if (page2 = _currentframe){
        _root.gotoAndStop("q2");
    } else if (page3 = _currentframe){
        _root.gotoAndStop("q3");
    } else if (page4 = _currentframe){
        _root.gotoAndStop("speciality");
    }
}

it works when the (page1 = _currentframe){ is rotated with the first if statement…because for somereason it seems to not recognise the “else if’s” anybody or reef have any ideas why??