Button Verlinkung = TypeError: Error #1009: [Flash 10]
| Beiträge: 22 Registriert: Oct 2009
| 05.07.2011, 20:18
Hallo,
mein folgender Code zum Verlinken funktioniert zwar, aber leider bekomme ich im Ausgabefenster beim Klick z.B. auf Button1 folgenden Fehler
"TypeError: Error #1009: Der Zugriff auf eine Eigenschaft oder eine Methode eines null-Objektverweises ist nicht möglich.
at Frost_fla::MainTimeline/btn1out()"
Ich bekomme nun leider nicht raus was falsch ist.
ActionScript:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | stop();
import flash.events.MouseEvent;
btn1.addEventListener(MouseEvent.CLICK, btn1click);
btn1.addEventListener(MouseEvent.MOUSE_OVER, btn1over);
btn1.addEventListener(MouseEvent.MOUSE_OUT, btn1out);
btn2.addEventListener(MouseEvent.CLICK, btn2click);
btn2.addEventListener(MouseEvent.MOUSE_OVER, btn2over);
btn2.addEventListener(MouseEvent.MOUSE_OUT, btn2out);
btn3.addEventListener(MouseEvent.CLICK, btn3click);
btn3.addEventListener(MouseEvent.MOUSE_OVER, btn3over);
btn3.addEventListener(MouseEvent.MOUSE_OUT, btn3out);
btn4.addEventListener(MouseEvent.CLICK, btn4click);
btn4.addEventListener(MouseEvent.MOUSE_OVER, btn4over);
btn4.addEventListener(MouseEvent.MOUSE_OUT, btn4out);
/*Ausführung auf btn1*/
function btn1click(event:MouseEvent):void{
gotoAndStop(2)
}
function btn1over(event:MouseEvent):void{
MovieClip(button1).gotoAndPlay(2)
}
function btn1out(event:MouseEvent):void{
MovieClip(button1).gotoAndPlay(11)
}
/*Ausführung auf btn2*/
function btn2click(event:MouseEvent):void{
gotoAndStop(3)
}
function btn2over(event:MouseEvent):void{
MovieClip(button2).gotoAndPlay(2)
}
function btn2out(event:MouseEvent):void{
MovieClip(button2).gotoAndPlay(11)
}
/*Ausführung auf btn3*/
function btn3click(event:MouseEvent):void{
gotoAndStop(4)
}
function btn3over(event:MouseEvent):void{
MovieClip(button3).gotoAndPlay(2)
}
function btn3out(event:MouseEvent):void{
MovieClip(button3).gotoAndPlay(11)
}
/*Ausführung auf btn4*/
function btn4click(event:MouseEvent):void{
gotoAndStop(5)
}
function btn4over(event:MouseEvent):void{
MovieClip(button4).gotoAndPlay(2)
}
function btn4out(event:MouseEvent):void{
MovieClip(button4).gotoAndPlay(11)
}
|
Kann mir da jemand helfen? | | | Beiträge: 161 Registriert: Apr 2010
| 06.07.2011, 09:32
|
|