Search code examples
actionscript-3flashflash-cs6

CS6 1046: Type was not found or was not a compile-time constant: void


import flash.events.MouseEvent;
stop();



button1.addEventListener(MouseEvent.CLICK, gobutton1);
function button1_clicked(e:MouseEvent):viod{
        gotoAndStop("page1");
}

button2.addEventListener(MouseEvent.CLICK, gobutton2);
function button2_clicked(e:MouseEvent):viod{
        gotoAndStop("page2");
}

button3.addEventListener(MouseEvent.CLICK, gobutton3);
function button3_clicked(e:MouseEvent):viod{
        gotoAndStop("page3");
}

button4.addEventListener(MouseEvent.CLICK, gobutton4);
function button4_clicked(e:MouseEvent):viod{
        gotoAndStop("page4");
}

im getting a 1046 error its about line 7,12,17 and 22 I got a web page in flash and it keeps flashing on a loop


Solution

  • You spelled void wrong at the end of all your function definitions.

    function button1_clicked(e:MouseEvent):viod
    // -------------------------------------^^