Simple ActionScript 3.0 help

Discussion in 'General Programming Chat' started by pxoxrxn, Jul 26, 2012.

  1. pxoxrxn

    pxoxrxn Supreme Member

    Joined:
    Dec 21, 2011
    Messages:
    1,398
    Likes Received:
    2,073
    Hi, I'm new to this AS stuff and I needs some help with this simple function I am trying to do. It gives me an error, expecting rightpan before colon. What is a rightpan.

    Cheers
     
  2. kiggd

    kiggd Junior Member

    Joined:
    Apr 28, 2012
    Messages:
    116
    Likes Received:
    44
    fl_ClickToPosition_3(event:MouseEvent);This line is invalid.event:MouseEvent is declaring a parameter. I'm not sure what you're trying to do here... Is that do while supposed to be in the function?What I would recommend (sorry formatting is all f'd up here... haven't figured out how to on these forums yet)
    Code:
    iscircle2.addEventListener(MouseEvent.CLICK, fl_ClickToPosition_3);// set default parameter of nullfunction fl_ClickToPosition_3(event:MouseEvent = null):void{circle2.x = 200;circle2.y = 100; } do { fl_ClickToPosition_3();} while (circle2.x < 800);