mene bar with flash

Thread Solved

Join Date: Mar 2008
Posts: 43
Reputation: severman is an unknown quantity at this point 
Solved Threads: 0
severman severman is offline Offline
Light Poster

mene bar with flash

 
0
  #1
Sep 23rd, 2009
h all
i have written this code from a website to make a menu bar with flash:
Graphics and Multimedia Syntax (Toggle Plain Text)
  1. var links:Array = ["www.ynet.co.il","www.walla.co.il","www.google.co.il","www.facebook.com","www.walla.com"];
  2. var menuButtons:Array = ["Home", "Works", "About", "Contact"];
  3. var subMenu1:Array = ["News", "Updates"];
  4. var subMenu2:Array = ["Web", "Print", "Interactive", "Audio", "Video"];
  5. var subMenu3:Array = ["About me", "Services", "Resume"];
  6. var subMenu4:Array = ["Email me", "City map"];
  7. var chosenMenu:Array = new Array();
  8. var subMenuOpened:Boolean = false;
  9. var whichSubMenu:Number = new Number();
  10. var currentPosition:Number = new Number();
  11. for (i=0; i<menuButtons.length; i++) {
  12. this.attachMovie("menu button", "menuButton"+i, this.getNextHighestDepth());
  13. this["menuButton"+i]._x = 30+(115*i);
  14. this["menuButton"+i]._y = 6;
  15. this["menuButton"+i].label_txt.text = menuButtons[i];
  16. this["menuButton"+i].onRollOver = function():Void {
  17. whichSubMenu = Number(this._name.substr(-1, 1));
  18. currentPosition = this._x;
  19. if (!subMenuOpened) {
  20. subMenuOpened = true;
  21. openSubMenu(whichSubMenu, currentPosition);
  22. } else {
  23. closeSubMenu();
  24. openSubMenu(whichSubMenu, currentPosition);
  25. }
  26. };
  27. }
  28. function openSubMenu(whichSubMenu, currentPosition):Void {
  29. chosenMenu = eval("subMenu"+(whichSubMenu+1));
  30. for (j=0; j<chosenMenu.length; j++) {
  31. this.createEmptyMovieClip("subMenuHolder_mc", this.getNextHighestDepth());
  32. subMenuHolder_mc.attachMovie("menu button", "subMenuButton"+j, this.getNextHighestDepth());
  33. subMenuHolder_mc["subMenuButton"+j]._x = currentPosition;
  34. subMenuHolder_mc["subMenuButton"+j]._y = 29+(j*23);
  35. subMenuHolder_mc["subMenuButton"+j].label_txt.text = chosenMenu[j];
  36. subMenuHolder_mc["subMenuButton"+j].onRelease = subMenuHolder_mc["subMenuButton"+j].onReleaseOutside=function ():Void {
  37. closeSubMenu();
  38. };
  39. }
  40. }
  41. function closeSubMenu():Void {
  42. removeMovieClip(subMenuHolder_mc);
  43. }
can any 1 help me how to add each button a link to url?
this is the url from where i coppid the code
http://flashexplained.com/menus-inte...rop-down-menu/
10x!
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1,331
Reputation: almostbob has a spectacular aura about almostbob has a spectacular aura about 
Solved Threads: 162
almostbob's Avatar
almostbob almostbob is online now Online
Nearly a Posting Virtuoso

Re: mene bar with flash

 
0
  #2
Sep 23rd, 2009
easy fix, dont use flash

there is nothing in that flash menu that can't be done smaller faster simpler in css
Failure is not an option It's included free
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it

Please mark solved problems, solved
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 150
Reputation: rajarajan07 is on a distinguished road 
Solved Threads: 20
rajarajan07's Avatar
rajarajan07 rajarajan07 is offline Offline
Junior Poster

Re: mene bar with flash

 
0
  #3
Sep 24th, 2009
Hi severman,

Please look into the attachment for the solution for the link

You have to add the code before 37 and you added only few links.
Use the J value to refer the array relevant link.
Attached Thumbnails
SolutionforLink.jpg  
Thanks & Regards,
RajaRajan. R

trulyraja2009@yahoo.in
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Graphics and Multimedia Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC