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

Circ1.addEventListener (Mouse.CLICK, ircircle);
function ircircle(Event:MouseEvent) {
Cuad1.addEventListener (Mouse.CLICK, ircuadrado);
function ircuadrado(Event:MouseEvent) {
Rec1.addEventListener (Mouse.CLICK, irrectangulo);
function irrectangulo(Event:MouseEvent) {
Tri1.addEventListener (Mouse.CLICK, irtriangulo);
function irtiangulo(Event:MouseEvent) {
Is.addEventListener (Mouse.CLICK, irisosceles);
function irisosceles(Event:MouseEvent){
Eq.addEventListener (Mouse.CLICK, irequilatero);
function irequilatero(Event:MouseEvent) {
Es.addEventListener (Mouse.CLICK, irescaleno);
function irescaleno(Event:MouseEvent) {

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'

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 All Rights Reserved