Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 27-10-2003, 21:18   #1 (permalink)
Neuer User
 
Registriert seit: Oct 2003
Ort: Santorini
Beiträge: 1
Question Hilfe Tutorial anpassen

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);
}
}
Salim ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 16:05 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele