Skip to main content
KiarasH_Mozafari-fvgtyI
Known Participant
August 12, 2009
Answered

null argoman!

  • August 12, 2009
  • 2 replies
  • 607 views

hello to every body;

I have problem with argoman of functions in actionScript 3 !

here is a simple doe :


stage
.addEventListener(KeyboardEvent.KEY_DOWN , stage_key_down);

function
stage_key_down(event:KeyboardEvent😞void
{
trace("OK");
}

when I press the DOWN key on my keyBorad ; this function will be run;

but I want this function directly in as!

for example like this :

stage_key_down() OR stage_key_down(null)

action script compiler run this function but get a warning !! how to run this  function dircetly with ut argoman !!

can any body help me or have a discussion ?

thanks a lot

This topic has been closed for replies.
Correct answer kglad

are you trying to call stage_key_down() without using that listener?  if so, use stage_key_down(new KeyboardEvent("test"));

2 replies

KiarasH_Mozafari-fvgtyI
Known Participant
August 12, 2009

thanks a  lot .

kglad
Community Expert
Community Expert
August 13, 2009

you're welcome.

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
August 12, 2009

are you trying to call stage_key_down() without using that listener?  if so, use stage_key_down(new KeyboardEvent("test"));