Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Actionscript / June 2006



Tip: Looking for answers? Try searching our database.

This should be easy, but I'm no coder

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Galeo Designs - 30 Jun 2006 16:29 GMT
First off I apologise if this topic has been posted before, or that its so
basic I'm just missing something.

I have designed a navigation bar for my website and am having trouble linking
the buttons to another page.

Do I have to make the other pages in Flash?
I have looked at the help files, but can't seem to get my head around
addlistener & onmouseup events.

Please help as I am at a complete loss.
sean-o - 30 Jun 2006 16:52 GMT
There are a couple ways you could tackle this...although it depends on what
kind of object you're using (button component, movie clip etc). If you're using
button components, the event listener model is the way to go. The evtObj
parameter that the function takes is passed in automatically:

buttonListener = new Object();
buttonListener.click = function (evtObj:Object) {

if (evtObj.target._name == "home_btn") {

getURL("home.html", "_self");

}else if (evtObj.target._name == "contact_btn") {

getURL("contact.html", "_self");

}
}

home_btn.addEventListener("click", buttonListener);
contact_btn.addEventListener("click", buttonListener);

If you're using a movie clip you could use this code (inside the button movie
clip) to perform the same operation:

//home movie clip
this.onRelease = function () {

getURL("home.html", "_self");

}
//contact movie clip
this.onRelease = function () {

getURL("contact.html", "_self");

}

Hope that helps!
Galeo Designs - 30 Jun 2006 17:12 GMT
Thank You.

I have entered the code in the frame where the buttons are located. and
nothing happens when I view the webpage.
I have changed the names of the button symbols to '(name)_btn'

What else should I be doing?
Sorry, I am completely new to this and trying to get my head around everything.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.