Jump to content


Photo

Rollover Menu/buttons


  • Please log in to reply
1 reply to this topic

#1 mastermoto2006

mastermoto2006

    Young Padawan

  • Members
  • Pip
  • 2 posts

Posted 06 October 2009 - 09:59 PM

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.co...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 :biggrin:
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
Posted Image

can anyone help me plz :wink:

#2 mastermoto2006

mastermoto2006

    Young Padawan

  • Members
  • Pip
  • 2 posts

Posted 07 October 2009 - 09:29 AM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users