FORUMS: list search recent posts

Sintax error

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Abigail perez
Sintax error
on Mar 2, 2013 at 6:07:14 pm

i'm making a project and it doesn't work, i tried fixing the errors but it still won't work.. i have this code

Stop()
Circ1.addEventListener (Mouse.CLICK, ircircle);
function ircircle(Event:MouseEvent) {
gotoAndStop(5);
}
Cuad1.addEventListener (Mouse.CLICK, ircuadrado);
function ircuadrado(Event:MouseEvent) {
gotoAndStop(10);
}
Rec1.addEventListener (Mouse.CLICK, irrectangulo);
function irrectangulo(Event:MouseEvent) {
gotoAndStop(15);
}
Tri1.addEventListener (Mouse.CLICK, irtriangulo);
function irtiangulo(Event:MouseEvent) {
gotoAndStop(20);
}
Is.addEventListener (Mouse.CLICK, irisosceles);
function irisosceles(Event:MouseEvent){
gotoAndStop(25);
}
Eq.addEventListener (Mouse.CLICK, irequilatero);
function irequilatero(Event:MouseEvent) {
gotoAndStop(30);
}
Es.addEventListener (Mouse.CLICK, irescaleno);
function irescaleno(Event:MouseEvent) {
gotoAndStop(35);
}


Return to posts index

demetri tashie
Re: Sintax error
on Mar 3, 2013 at 2:07:13 am

your event listener in this/these case(s) should be 'MouseEvent', not just 'Mouse' as you have it written.
change them all and see if that works for you

for example:

Circ1.addEventListener (<b>MouseEvent</b>.CLICK, ircircle);

and as best practice the functions should have a return type specified, which in this case is 'void'
example:

function ircircle(Event:MouseEvent<b>):void</b> {


Return to posts index

Abigail perez
Re: Sintax error
on Mar 3, 2013 at 5:34:40 pm

it worked! thank you so much!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]