1 Reply Latest reply on Aug 17, 2007 1:01 PM by 8bit_jeff_fulton

    Stuck... Pease need help passing variable

    Demaestro
      Hi all....

      I have an event listener added and it calls a function. Adding the event listener passes the event to the function automatically but what if i want to pass additional information to it?

      So this:
      addEventListener(Event.ENTER_FRAME, doEveryFrame);

      Becomes this
      addEventListener(Event.ENTER_FRAME, doEveryFrame(extra_var_passed));

      function doEveryFrame(event:Event, extra_var_passed:Number):void {
      //code here
      }

      It seems because I am trying to pass a new variable it no longer passes the event for me auto-magically.... how I go about passing that event myself?

      Is it possible to even pass another variable like this??