A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Flash Maze Game

  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    8

    Flash Maze Game

    Hello,
    I am creating a Simple Flash Maze Game,
    and i have 2 'Movie Clips' that i want to react when the collide.
    IE. When 'CHAR_LVL1' (A Movie Clip, controlled with the Arrow Keys) comes into contact with 'WALL_LVL1'. I want it to 'gotoAndStop(27);'

    I am using the code:
    Code:
    onClipEvent(enterFrame) {
    if (_root.CHAR_LVL1, hitTest(_root.WALL_LVL1)) {
    gotoAndPlay(27);
    }
    }
    What am i doing wrong.
    FYI:
    I am using Flash CS5 and Action Script 2.0

  2. #2
    Junior Member
    Join Date
    Mar 2011
    Posts
    4
    Why are you using gotoAndPlay?
    Shouldn't you be using gotoAndStop?

  3. #3
    Registered User
    Join Date
    Mar 2011
    Posts
    8

    Sorry

    Yes i am using gotoAndStop(27);

    typo!

  4. #4
    Member
    Join Date
    Sep 2008
    Posts
    71
    Actionscript Code:
    if(_root.CHAR_LVL1.hitTest(_root.WALL_LVL1)){
    gotoAndPlay(27);
    }

    make sure the wall has the instance name WALL_LVL1 and the char has the instance name CHAR_LVL1

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center