Fade out page into another page

Hi

It’s been a while since I’ve been here…

I usually build flash site all within a main flash file and other loading into it, but I want to do my current site with 5 pages and 5 html pages. But I don’t want to just click on the menu and the new page replaces the current page, I want the current page to undo and fade first.

I can get my head round telling it to go to an ‘out’ frame on a button press, but then at the end of the timeline I need another action for loading the relevant page, but how do I specify which page.

So if I have home, about, services, portfolio and contact as my sections. If I’m in about and click services, which then goes to a frame ‘out’ in about, how does it then know what to load??

Hope this make sense??

Sounds like you’re using timelines, so the easy way is to put a fade-in tween at the start of each page, with a stop in the middle, followed by a fade-out tween.

You’ll need to monitor frame progress, so flash can load in the new ‘page’ after the fade out has completed.


//You'll need to add your 5 buttons
menuButton1.onRelease = function() {
    loadPage("page1.swf");
};

//Load your 'pages' into a container mc
function loadPage(pageName) {
    portfolioContainer.gotoAndPlay("out");

    this.onEnterFrame = function() {
        if (portfolioContainer._currentframe == portfolioContainer._totalframes) {
            delete this.onEnterFrame;
            portfolioContainer.loadMovie(pageName);       
        }
    };
}

Thanks for your reply.

I was going to put each swf into a seperate html, but your way of loading into a container and keeping within 1 html would probably work better… I will give it a try.

Thanks

You can do the same with html, just pass in the page.htm name. If you want to ‘fade’ an entire html page, you’ll need javascript instead.


//You'll need to add your 5 buttons
menuButton1.onRelease = function() {
    loadPage("page1.htm");
};

//Play your movie 'out' and load html page when complete
function loadPage(pageName) {
    myPageMovie.gotoAndPlay("out");

    this.onEnterFrame = function() {
        if (myPageMovie._currentframe == myPageMovie._totalframes) {
            delete this.onEnterFrame;
            
            getURL(pageName , "_self ");
        }
    };
}