HELP! How would I fix this Actionscript 3.0 so that it creates a Dynamic Page title for each page? I am new to Actionscript 3.0 and I am trying to generate a page title using Dynamic Text for each page. I have four pages in my site, and here is the actionscript that I have so far:
stop ()
function createTitle (whichpage:String) {
pageTitle.text = whichpage;
};
var page:String="theres no place like home";
createTitle (page);
function btn1Press (MouseEvent) {
gotoAndStop (1);
}
function btn2Press (MouseEvent) {
gotoAndStop (10);
}
function btn3Press (MouseEvent) {
gotoAndStop (20);
}
function btn4Press (MouseEvent) {
gotoAndStop (30);
}
btn1Press.addEventListener (MouseEvent.CLICK, Home);
btn2Press.addEventListener (MouseEvent.CLICK, Services);
btn3Press.addEventListener (MouseEvent.CLICK, About);
btn4Press.addEventListener (MouseEvent.CLICK, Contact);
stop();
1,10,20,30 represent the frames that each page is on
The four navigation buttons are setup as follows:
btn1Press = Home Page (Instance name "Home")
btn2Press = Services Page (Instance name "Services")
btn3Press= About Page (Instance name "About")
btn4Press=Contact Page (Instance name "Contact")
I already have the dynamic text box set up. Basically I need each of the buttons to go to their respective pages, and I need the text in the dynamic text box to change depending on which page it is. Here is the additional actionscript that I have at frames 10,20 and 30 (services,about,and contact)
page = "services"; createTitle (page); stop ();
page = "about"; createTitle (page); stop ();
page = "contact"; createTitle (page); stop ();
I am getting really frustrated with this, and any help would be SO awesome!
I keep getting error #1061 about undefined functions
So I think a better way to ask my question would be:
I have a four page site in Flash CS4, Page 1 starts on Frame 1, Page 2 starts on Frame 10, Page 3 starts on Frame 20 and Page 4 starts on Frame 30. There are Four navigation buttons that I have converted to button symbols. What should I call each button, and what should I call the instance of each button? What code do I need to put in the actions panel in order to get the navigation buttons to function properly, and make the dynamic text box display a title specific to the page that it is on ("Welcome to the Home Page", "Welcome to the About Page", etc)
Thanks for your help + patience, I am finding this all pretty confusing. :(