Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 22-02-2006, 15:29   #1 (permalink)
Neuer User
 
Registriert seit: Jan 2006
Beiträge: 52
Sound behindert Klickfunktion

Hallo, habe ein ganz schön gemeines Problem. Wenn ich auf mein Klappmenü einen Sound setzte, funktionieren die Links der Untermenüs nicht mehr, ist der Sound weg, funzt alles... hat jemand eine Idee woran das liegen könnte?

Grüße

PHP-Code:
rollover_sound = new Sound();
rollover_sound.loadSound("rollover.mp3",false);
this.btn_menu.onRollOver = function()  {
  
rollover_sound.start(0,1);
}
this.onMouseMove = function() {
    if (
btn_menu.hitTest(_root._xmouse_ymouse)) {
            
this.btn_menu.onEnterFrame = function() {
            
this.gotoAndStop(this._currentframe += 1);
            if (
this._currentframe>=this._totalframes) {
                
delete this.onEnterFrame;
            }
        };
    } else {
        
this.btn_menu.onEnterFrame = function() {
            
this.gotoAndStop(this._currentframe -= 1);
            if (
this._currentframe == 1) {
                
delete this.onEnterFrame;
            }
        };
    }
};
this.btn_menu.onRollOut = function()  {
  
rollover_sound.stop();
  }
this.btn_menu.um_teams.onPress = function() {
    
loadMovie("teams.swf",0);
};
this.btn_menu.um_gruppen.onPress = function() {
    
loadMovie("gruppen.swf",0);
};
this.btn_menu.um_quiz.onPress = function() {
    
loadMovie("quiz.swf",0);
};
this.btn_menu.um_impressum.onPress = function() {
    
loadMovie("impressum.swf",0);

kiesi007 ist offline   Mit Zitat antworten
Alt 22-02-2006, 15:33   #2 (permalink)
................
 
Benutzerbild von Der Frager
 
Registriert seit: Jun 2004
Beiträge: 15.890
Hallo!

Musst du beim hitTest() mit reinpacken, sonst fängt das RollOver() die restlichen Events ab.
__________________

ternärer Konditionaloperator

+++ Bitte keine Privat-Nachrichten bezüglich Flashfragen! +++
Der Frager ist offline   Mit Zitat antworten
Alt 22-02-2006, 15:42   #3 (permalink)
Neuer User
 
Registriert seit: Jan 2006
Beiträge: 52
mmhh...habs grad probiert, aber dann treten ganz viele Fehler auf, wo muss es denn genau stehen?
kiesi007 ist offline   Mit Zitat antworten
Alt 22-02-2006, 15:52   #4 (permalink)
................
 
Benutzerbild von Der Frager
 
Registriert seit: Jun 2004
Beiträge: 15.890
So, denke ich, geht's wohl:
PHP-Code:
_global.rollover_sound = new Sound(this);
rollover_sound.loadSound("rollover.mp3"false);
this.onMouseMove = function() {
    if (
this.btn_menu.hitTest(_root._xmouse_ymouse)) {
        if (!
this.hit) {
            
this.hit true;
            
rollover_sound.start(01);
        }
        
this.btn_menu.onEnterFrame = function() {
            
this.nextFrame();
            if (
this._currentframe == this._totalframes) {
                
delete this.onEnterFrame;
            }
        };
    } else {
        
rollover_sound.stop();
        
this.hit false;
        
this.btn_menu.onEnterFrame = function() {
            
this.prevFrame();
            if (
this._currentframe == 1) {
                
delete this.onEnterFrame;
            }
        };
    }
};
this.btn_menu.um_teams.onPress = function() {
    
loadMovie("teams.swf"0);
};
this.btn_menu.um_gruppen.onPress = function() {
    
loadMovie("gruppen.swf"0);
};
this.btn_menu.um_quiz.onPress = function() {
    
loadMovie("quiz.swf"0);
};
this.btn_menu.um_impressum.onPress = function() {
    
loadMovie("impressum.swf"0);
}; 
__________________

ternärer Konditionaloperator

+++ Bitte keine Privat-Nachrichten bezüglich Flashfragen! +++
Der Frager ist offline   Mit Zitat antworten
Alt 22-02-2006, 15:56   #5 (permalink)
Neuer User
 
Registriert seit: Jan 2006
Beiträge: 52
Genial... da hätte ich aber noch Wochen gegrübelt... vielen Dank
kiesi007 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:53 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele