Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 26-12-2007, 11:42   #1 (permalink)
Neuer User
 
Registriert seit: Nov 2007
Beiträge: 2
sliding menu

hallo,

habe ein nettes menu gefunden, dass ich gern sowohl per mouseclick (standard) als auch automatsch ablaufen lassen möchte.
habe leider keine ahnung, wie ich den automatischen ablauf bewerkstelligen kann.
kann mir jemand einen tip geben?
Angehängte Dateien
Dateityp: zip sliding_menu.zip (12,0 KB, 11x aufgerufen)
jackrussel ist offline   Mit Zitat antworten
Alt 27-12-2007, 12:30   #2 (permalink)
hilft gerne...
 
Registriert seit: Feb 2007
Ort: Carlsberg
Beiträge: 416
Mh ich habe leider nicht die Zeit, mich durch deinen Code zu arbeiten, aber mal als kleinen Tipp: Gewöhn dir mal an, wenn überhaupt auf der Zeitleiste, dann möglichst nur in einem Schlüsselbild (das erste auf _level0) deinen Code aufzusetzen. Ist für die Übersicht und fürs Lesen leichter =)

Grüßle
__________________
MfG Jan

Meine 2 besten Freunde: Flash-Hilfe und die Foren-Suche =)
McMannus ist offline   Mit Zitat antworten
Alt 31-12-2007, 09:46   #3 (permalink)
Neuer User
 
Registriert seit: Nov 2007
Beiträge: 2
habe die codes mal rausgeschrieben ... vlt kann mir dann jemand einen kleinen tip geben:

damit startet die szene:
Code:
increment = 20;
ratio = 0.4;
content_width = 5*increment;
items = 4;
x_values = new Array(items);
i = 0;
while (i<items) {
    x_values[i] = i*increment;
    i += 1;
}
Code:
onClipEvent (enterFrame) {
    _root.mouse_pos = getProperty(_root.movie, _xmouse);
    _root.menu_pos = Int(_root.mouse_pos + 11) ;
    with (_root.roller) {
        gotoAndStop(Int(_root.mouse_pos) + 11);
    }
    // set new x positions
    setProperty("_root.movie.square_0", _x, (_root.movie.square_0._x+(_root.x_values[0]-_root.movie.square_0._x)*_root.ratio));
    setProperty("_root.movie.square_1", _x, (_root.movie.square_1._x+(_root.x_values[1]-_root.movie.square_1._x)*_root.ratio));
    setProperty("_root.movie.square_2", _x, (_root.movie.square_2._x+(_root.x_values[2]-_root.movie.square_2._x)*_root.ratio));
    setProperty("_root.movie.square_3", _x, (_root.movie.square_3._x+(_root.x_values[3]-_root.movie.square_3._x)*_root.ratio));
}
dann gibt es vier movieclips mit der bezeichnung square_0-3. darin liegen die button die folgenden code aufrufen:

Code:
on (release) {
    // set destinations
    if (nr == 1) {
        _root.x_values[0] = 0;
        _root.x_values[1] = _root.x_values[0] + _root.content_width + _root.increment;
        _root.x_values[2] = _root.x_values[1] + _root.increment;
        _root.x_values[3] = _root.x_values[2] + _root.increment;
    }
    if (nr == 2) {
        _root.x_values[0] = 0;
        _root.x_values[1] = _root.x_values[0] + _root.increment;
        _root.x_values[2] = _root.x_values[1] + _root.content_width + _root.increment;
        _root.x_values[3] = _root.x_values[2] + _root.increment;
    }
    if (nr == 3) {
        _root.x_values[0] = 0;
        _root.x_values[1] = _root.x_values[0] + _root.increment;
        _root.x_values[2] = _root.x_values[1] + _root.increment;
        _root.x_values[3] = _root.x_values[2] + _root.content_width + _root.increment;
    }
    if (nr == 4) {
        _root.x_values[0] = 0;
        _root.x_values[1] = _root.x_values[0] + _root.increment;
        _root.x_values[2] = _root.x_values[1] + _root.increment;
        _root.x_values[3] = _root.x_values[2] + _root.increment;
    }
}
hoffe die beschreibung ist einigermaßen verständlich.
jackrussel 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 05:45 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele