screen1

screen1
Fish Heroes Coming to iOS!

Share

Pin It

3 comments

  1. Harriett Legler July 7, 2012 at 2:11 am - Reply

    ok so i’m creating a game using flash and actionscript 3.0. I’ve just fixed one problem but now i have another, when i run my game it comes up with a 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)

    I’ve tried googling the problem but i don’t understand what it means, i’ve never used action script before in my life and i’m completely new to it, but we have to use it to complete a module on my course. So can anyone explain what’s going on?

    I’m trying to control a character using the keyboard but i’m not having much luck. I’ll paste the code i have so far below:

    package
    {
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    import flash.events.KeyboardEvent;
    import flash.ui.Keyboard;

    public class Main1 extends MovieClip
    {

    var screen1:StartScreen;
    var screen2:InstructionScreen1;
    var screen3:InstructionScreen2;
    var screen4:GameScreen;

    public function Main1()
    {

    screen1 = new StartScreen();
    screen2 = new InstructionScreen1();
    screen3 = new InstructionScreen2();
    screen4 = new GameScreen();

    screen1.playBtn.addEventListener(MouseEvent.CLICK,gotoGameScreen);
    screen1.howtoplayBtn.addEventListener(MouseEvent.CLICK,gotoInstructionScreen1);
    screen2.arrowBtn.addEventListener(MouseEvent.CLICK,gotoInstructionScreen2);
    screen3.playBtn.addEventListener(MouseEvent.CLICK,gotoGameScreen2);
    addChild(screen1);
    }

    private function gotoGameScreen(evt:MouseEvent):void
    {
    removeChild(screen1);

    addChild(screen4);

    screen4.toothy.x = -210;
    screen4.toothy.y = 150;
    }

    private function gotoGameScreen2(evt:MouseEvent):void{
    removeChild(screen3);

    addChild(screen4);
    screen4.toothy.x = -210;
    screen4.toothy.y = 150;
    }

    private function gotoInstructionScreen1(evt:MouseEvent):void
    {
    removeChild(screen1);
    addChild(screen2);
    }
    private function gotoInstructionScreen2(evt:MouseEvent):void
    {
    removeChild(screen2);
    addChild(screen3);
    }

    public function fairy()
    {
    init();
    }
    function init():void
    {
    stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
    }

    function onKeyDown(event:KeyboardEvent):void
    {
    if (event.keyCode == Keyboard.LEFT)
    {
    toothy.x -= 10;
    }
    else if (event.keyCode == Keyboard.RIGHT)
    {
    toothy.x += 10;
    }
    else if (event.keyCode == Keyboard.DOWN)
    {
    toothy.y += 10;
    }
    else if (event.keyCode == Keyboard.UP)
    {
    toothy.y -= 10;
    }
    }
    }
    }

  2. I installed Windows 7 in my PC and Blue Screen1 time and I restart. Every Time I use my PC, it crashes/blue screen every 2 hours. Saying I need to Check my hardware or software. i checked my hardwares and it’s now fine but it’s still crashing.
    It said i need to check my hardware and software if properly installed.

    Tablet, Video Card, Sound, Lan, Chipset are properly installed but they still popping out that blue screen that i have to check my hardware and software

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>