Code of the property not defined! Help, please! Can't find what the problem is!

So I do this coding for a school project and I repeated retype the code 3 times and the same problems still appear!

Here is the code

function keyDownHandler(Event:KeyboardEvent):void

{

if(Event.keycode == 38)

{

SpeedVert-=. 2;

avatar_mc.gotoAndStop ("up")

}

another if (event.keyCode is 37)

{

SpeedHor-= 1;

avatar_mc.gotoAndStop ("left")

}

another if (event.keyCode is 39)

{

SpeedHor += 1;

avatar_mc.gotoAndStop ("Right")

}

The problem

1119: access of the keyCode property possibly undefined via a reference with a static type flash.events:MouseEvent

1119: access of the keyCode property possibly undefined via a reference with a static type flash.events:MouseEvent

1119: access of the keyCode property possibly undefined via a reference with a static type flash.events:MouseEvent

The problem is the keyCode! I can't understand August what is the problem!

Thanks to all who help!

In your function definition line, you use "Event" (false) while the code within the function uses 'event' (better).  Difficulty for beginners.  Also, given that the messages that all have "MouseEvent" identified in them, I have to wonder if the event listener that you assigned is not specified as a listener KeyboardEvent

Tags: Adobe Animate

Similar Questions

Maybe you are looking for

  • No problem with the logout?

    I have iCloud lit work Mac and I want to put out to keep my personal business out of it. Are there problems with disconnection? I want to just make sure that it will not remove anything of my other devices. Thank you.

  • I have an AirPort Express 802.11n (I just got 1st generation) who does not appear in Airport utility? The Express flashes an orange light.

    I have an AirPort Express 802.11n (I just got 1st generation) who does not appear in Airport utility? The Express flashes an orange light. I tried to reset to factory by using a paperclip for a little more than 10 seconds (green LED flashes). The Exp

  • 1603 error code when you try to download .NET Framework 3.5 SP1

    When are they going thro installation procedure for Avanquest software, that it automatically attempts to install net.framework 3.5 sp1.  Installation can fail with the error code 1603. tried to install net framework 3.5 sp1 myself live microsoft sit

  • ACER X223W monitor

    I want to remove my monitor X223W settlement and the related appendices. Is this possible? I am installing a dual screen system, and the bulk of the material that attached to the back of the monitor is a bit unsightly in this type of circumstance. An

  • Wireless printing HP Deskjet F380 from Mac to XP - stands

    Implement PC XP Home + sp3 with connected printer (usb) Shared Netgear wireless router MacBook Pro OS 10.7.4 Printer works fine form XP (usb direct print) Printer Works Fine of Macbook (usb direct print) * Printer stalls to ~ 64kb or less when I try