# AS3 Migration issue:

**URL:** <https://forum.kirupa.com/t/as3-migration-issue/288969>\
**Category:** flash\
**Created:** [May 24, 2009, 9:04am UTC](https://forum.kirupa.com/t/as3-migration-issue/288969 "2009-05-24T09:04:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thunder\_one](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@Thunder\_one](https://forum.kirupa.com/u/Thunder_one)\
**Post date:** [May 24, 2009, 9:04am UTC](https://forum.kirupa.com/t/as3-migration-issue/288969/1 "2009-05-24T09:04:01Z")

</div>

Hello all…  
newbie looking for some helping hands…

I am getting couples of Migration issue when compile in Adobe CS4…

**Warning:**

> Warning: 1090: Migration issue: The onKeyDown event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( ‘keyDown’, callback\_handler).

**Code: 1**

```php
protected function onKeyDown(Event:KeyboardEvent):void{
            if (Event.keyCode == Keyboard.ESCAPE){
                pause();
            };
        }

```

**Code: 2**

```php
private function onEnterFrame(arg1:flash.events.Event):void
        {
            return;
        }

```

**Code: 3**

```php
private function onKeyUp(arg1:flash.events.KeyboardEvent):void
        {
            if (arg1.keyCode == Keyboard.ENTER)
            {
                arg1.target.removeEventListener(KeyboardEvent.KEY_UP, onKeyUp);
                onSubmit(arg1);
            }
            return;
        }

```

**Code: 4**

```php
private function onKeyUp(arg1:flash.events.KeyboardEvent):void
        {
            if (arg1.keyCode == Keyboard.ENTER || arg1.keyCode == Keyboard.ESCAPE)
            {
                removeEventListener(KeyboardEvent.KEY_UP, onKeyUp);
                this.close();
            }
            return;
        }

```

**Code: 5**

```php
protected function onKeyUp(_arg1:KeyboardEvent):void{
            if ((((_arg1.keyCode == controller.LEFT)) || ((_arg1.keyCode == controller.RIGHT)))){
                startCarousel = false;
                carouselReady = false;
            };
        }

```

**Code: 6**

```php
override protected function onKeyDown(_arg1:KeyboardEvent):void{
            super.onKeyDown(_arg1);
            if ((((_arg1.keyCode == controller.LEFT)) || ((((_arg1.keyCode == controller.RIGHT)) && (!(carouselReady)))))){
                carouselReady = true;
            };
        }

```

My App works after compile, but you can notice some **malfunctions** when pressed the KeyDown

any help would be grateful appreciated.

Best,

Thunder\_one
