# HELP! website programming struggles

**URL:** https://forum.kirupa.com/t/help-website-programming-struggles/206828
**Category:** Uncategorized
**Created:** [November 11, 2006, 10:49pm UTC](https://forum.kirupa.com/t/help-website-programming-struggles/206828 "2006-11-11T22:49:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jayrich86](https://avatars.discourse-cdn.com/v4/letter/j/e8c25b/32.png) [@jayrich86](https://forum.kirupa.com/u/jayrich86)
#### Post date: [November 11, 2006, 10:49pm UTC](https://forum.kirupa.com/t/help-website-programming-struggles/206828/1 "2006-11-11T22:49:40Z")

</div>

heres what im trying to do in words:

i have 5 buttons, when on the home page, when a button is clicked i want it to do the following:

1. play an “unload” animation, where the homepage is cleared
2. play the “load” animation of a specified page

i.e. when on the homepage you click about, it unloads the home page, and loads on the about page.

now, heres how im trying to achieve this:

on frame 20 the home page loads, the actions for the gallery button and about button are on the actions layer of this frame:  
\*\*[SIZE=2][COLOR=#000080]\_root.menu\_mc.galleriestext.onRelease = function() {  
var myvar = “gal”;  
\_root.gotoAndPlay(“HOMEUNLOAD”);  
};  
\*\*[SIZE=2][COLOR=#000080]\_root.menu\_mc.abouttext.onRelease = function() {  
var myvar = “about”;  
\_root.gotoAndPlay(“HOMEUNLOAD”);  
};  
**[/COLOR][/SIZE]**[/COLOR][/SIZE]  
the unload animation is on the main timeline from frame 60 - 84, labeled “HOMEUNLOAD”  
on frame 84, flash checks for the variables:

\*\*[SIZE=2][COLOR=#000080]if (myvar = “gal”) {  
\_root.gotoAndPlay(“GALLERIES”);  
}  
\*\*[SIZE=2][COLOR=#000080]if (myvar = “about”) {  
\_root.gotoAndPlay(“ABOUT”);  
}  
**[/COLOR][/SIZE]**[/COLOR][/SIZE]  
the gallery page is on frame 136, labeled “GALLERIES”  
the about page is on frame 85, labeled “ABOUT”.

here is whats happening:  
when either button is clicked, it unloads, but loads the about page

please help me!
