• home
  • forum
  • my
  • kt
  • download
  • Home / 2D Graphics / Flash / Tricks /

    Create a Mouse Avoider in Flash

    Author: 2008-10-08 13:47:42 From:

    After reading tutorial and mastering this handy and simple script you will be able to create both simple and complex games, the aim of which is to aviod the obstacles with your cursor.

    The first step is to draw your maze. Once you have drew it, convert it into a movie clip and give it no AS. Then draw the button you want the player to touch before the maze becomes active. Give it the following AS.

    CODE
    on(release){
    _root.gotoAndStop(2)}


    Feel free to change release to press or rollOver. The next step is to copy your maze onto frame 2 and on this frame draw a button that the player will have to press to complete the game. Then give that button the following AS.

    CODE
    on(release){
    _root.gotoAndStop(3)}


    Once again weather or not you change the release part is up to you. Now you need to give your maze on frame 2 the following script.

    CODE
    on(rollOver,rollOut){
    _root.gotoAndStop(4)}


    This will take player to frame 4 if they touch the walls. The final step is to go to frame 3 and 4 and draw a "you win" page and a "you lose page" with options to restart the game etc.

    If this script is not working, feel free to download a sample file Here !

    discuss this topic to forum

    relation tutorial

    No relevant information

    Category

      3D (20)
      Math Physics (14)
      3rd Party (5)
      Navigation (60)
      Actionscripting (26)
      Optimization (16)
      Animation (32)
      Projector (9)
      Audio (46)
      Special Effects (112)
      Backend (25)
      Text Effects (65)
      Drawing (18)
      Tips and Techniques (41)
      Dynamic Content (25)
      Tricks (7)
      Games (97)
      Utilities (21)
      Getting Started (91)
      Video (24)
      Interactivity (43)
      Web Design (29)

    New

    Hot