| |||||||
Du magst keine Werbung? Wir auch nicht!
Einfach registrieren und die Werbung ist weg. Diese Nachricht sehen nur nicht registrierte Nutzer.
![]() |
| | LinkBack | Themen-Optionen | Ansicht |
| | #1 (permalink) |
| Neuer User Registriert seit: Oct 2003 Ort: Santorini
Beiträge: 1
|
Hallo ich habe hier ein wunderbares tut für ein dynamisches menu gefunden. Möchte den Buttons jetzt einen LoadMovie action geben... Kann mir jemand weiter helfen::: // - this is the fuction you would change to load content, or add more functionality to the buttons function doSubSection (target, sub) { _root.currentSelection = target +" "+ sub; closeSubs(currentOpen); } Tja, eben z.B wenn currentSelection Main0Sub1 ist, load movie"01.swf"... Thanks Salimi Completer Script: onClipEvent (load) { // -- set up names of main items here // -- you can add as many new sections as you want (or your computer can handle) mainSections = new Array("Section 0", "Section 1", "Section 2", "Section 3", "Section 4"); // -- one array for each main Section - subSection0 = new Array("zero", "One", "Two", "Three", "Four", "Five"); subSection1 = new Array("zero", "One"); subSection2 = new Array("zero", "One", "Two", "Three"); subSection3 = new Array("zero", "One", "Two", "Three", "Four"); subSection4 = new Array("zero", "One", "Two"); // -- // -- // -- build the main buttons for (i=0; i<mainSections.length; i++) { attachMovie("mainButton", "main"+i, i+100); myButton = this["main"+i]; myButton.subs = this["subSection"+i]; myButton.button.value = mainSections[i]; myButton._x = myButton._width*i; // -- build subsection buttons for each main button for (x=0; x<myButton.subs.length; x++) { myButton.attachMovie("subButton", "sub"+x, x); mySub = myButton["sub"+x]; mySub.button.value = myButton.subs[x]; mySub.button.outYpos = myButton._height+(mySub._height*x); } } // -- function that opens the subsection on rollover function openSubs (target) { for (i=0; i<this[target].subs.length; i++) { subMenuCounter = 0; this[target]["sub"+i].button.newY = this[target]["sub"+i].button.outYpos; currentOpen = target; } } // -- close subsections function function closeSubs (target) { for (i=0; i<this[target].subs.length; i++) { this[target]["sub"+i].button.newY = this[target]["sub"+i].button.oYpos; } } // - this is the fuction you would change to load content, or add more functionality to the buttons function doSubSection (target, sub) { _root.currentSelection = target +" "+ sub; closeSubs(currentOpen); } } onClipEvent (enterFrame) { // -- a timer that closes the menus after a certain amount of time subMenuCounter++; if (subMenuCounter>100) { closeSubs(currentOpen); subMenuCounter = 0; } } onClipEvent (mouseUp) { // -- this closes the curently open submenu if the user clicks outside of the menu if (!this.hitTest(_root._xmouse, _root._ymouse)) { closeSubs(currentOpen); } } |
| | |
![]() |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | |
| |