Help - Search - Members - Calendar
Full Version: Rollover Menu/buttons
Pixel2Life Forum > Help Section > Adobe Flash
mastermoto2006
I am trying to build a roll over nav bar for a site i am building.. but i am getting an error

I used http://www.tutvid.com/tutorials/flash/tuto...opDownMenus.php to learn how to create the nav bar.

and i am trying to link to an external page outside the Swf(of course)

here is the code i added to the page to try to attempt to get it to connect... i am an actionscript newb so i could use some help smile.gif
CODE
var sales_req:URLRequest = new URLRequest("sales.htm");
var contact_req:URLRequest = new URLRequest("contact.htm");
var mortgage_req:URLRequest = new URLRequest("morgage.htm");
var agents_req:URLRequest = new URLRequest("agents.htm");
var about_req:URLRequest = new URLRequest("about.htm");

var auction_req:URLRequest = new URLRequest("auctions.htm");
var commercial_req:URLRequest = new URLRequest("commercial.htm");
var homes_req:URLRequest = new URLRequest("homes.htm");
var land_req:URLRequest = new URLRequest("land.htm");

function sales(event:MouseEvent):void{
navigateToURL(sales_req, "_self");
}
function contact(event:MouseEvent):void{
navigateToURL(contact_req, "_self");
}
function mortgage(event:MouseEvent):void{
navigateToURL(mortgage_req, "_self");
}
function agents(event:MouseEvent):void{
navigateToURL(agents_req, "_self");
}
function about(event:MouseEvent):void{
navigateToURL(about_req, "_self");
}
function auctions(event:MouseEvent):void{
navigateToURL(auctions_req, "_self");
}
function commercial(event:MouseEvent):void{
navigateToURL(commercial_req, "_self");
}
function homes(event:MouseEvent):void{
navigateToURL(homes_req, "_self");
}
function land(event:MouseEvent):void{
navigateToURL(land_req, "_self");
}

sales_mc.addEventListener(MouseEvent.CLICK, sales);
contact_mc.addEventListener(MouseEvent.CLICK, contact);
mortgage_mc.addEventListener(MouseEvent.CLICK, mortgage);
agents_mc.addEventListener(MouseEvent.CLICK, agents);
about_mc.addEventListener(MouseEvent.CLICK, about);

auctions_btn.addEventListener(MouseEvent.CLICK, auctions);
commercial_btn.addEventListener(MouseEvent.CLICK, commercial);
homes_btn.addEventListener(MouseEvent.CLICK, homes);
land_btn.addEventListener(MouseEvent.CLICK, land);


the errors i am getting are


can anyone help me plz smile.gif
mastermoto2006
Never Mind, i got it working,


For anyone that tried this tutorial and is having problems with doing links, you have to put the actual link code into the Scene where the button is. i'm sure there is a way to do it without seperating the code but i figured this was a lot easier
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.