Results 1 to 5 of 5
  1. #1
    arunforce's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Location
    A place for amigos
    Posts
    24,704
    Reputation
    4747
    Thanks
    12,562
    My Mood
    Yeehaw

    [Tut] Basic Screen Cleaning Game (AS2)

    Create a AS2 file, draw two circles on the stage, a 50x50 circle, and a 10x10 circle.

    Select the 50x50 ball, and turn it into a movieclip (F8), name it "cleaner", registration in the center, export for actionscript (click the checkbox), identifier "cleaner" (if not automatically done).

    Do the same for the 10x10, but name it "target" this time.

    Now, delete everything off the stage, don't worry they are in the library.

    Make sure you are in the root scene, and select the first frame from the timeline, and paste this code into the actionscript manager (press F9 to open and close it), everything is straightforward telling which each command does in the code.

    Code:
    //Create the big cleaner circle
    attachMovie("cleaner", "cleaner", getNextHighestDepth(), {_x: _xmouse, _y: _ymouse});
    //Make the cleaner follow the mouse
    startDrag(cleaner);
    //Hide the mouse
    Mouse.hide();
    
    //enemy count
    var enemies = 50;
    //Create the enemies
    for (var i = 0; i < enemies; i++)
    {
        //place the enemies on the screen
        attachMovie("target", "target_"+i, getNextHighestDepth(), {_x: random(Stage.width), _y: random(Stage.height)});
        //dynamically attach the behavior for the targets
        _root["target_"+i].onEnterFrame = function()
        {
            //Check for hitting the cleaner
            if (this.hitTest(cleaner))
            {
                //remove the movie clip if it hits the cleaner
                removeMovieClip(this);
            }
        }
    }
    Here's the result:


    As you can imagine, I can clear the screen with my mouse.

    If theres enough interest, I might continue a part two, on how to transform it into an addicting mini-game.
    Last edited by arunforce; 08-04-2010 at 02:44 AM.



    BRING BACK BT, BRING BACK SAGA, BRING BACK VF, BRING BACK MPGHCRAFT, BRING BACK HABAMON


  2. The Following 5 Users Say Thank You to arunforce For This Useful Post:

    648DFSsdQ#$4 (08-21-2010),Hassan (08-04-2010),Jakob (06-25-2011),Janot (06-20-2015),NextGen1 (08-21-2010)

  3. #2
    Insane's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    9,057
    Reputation
    1007
    Thanks
    2,013
    W00T!
    1 Thank in two weeks.
    Thats enough hype. PART TWO PART TWO

    Ex Middleman

  4. #3
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Thanked. Mini game may be interesting.

    Keep in mind, Adobe Flash CS5 makes native Flash games for I-Phone. So I am interested

  5. #4
    648DFSsdQ#$4's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    209
    Reputation
    25
    Thanks
    413
    My Mood
    Stressed
    Poor guy. No part 2
    /Thanked for his optimism

  6. #5
    Taylor Swift's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Location
    Spangdahlem, Germany
    Posts
    6,438
    Reputation
    357
    Thanks
    651
    My Mood
    Yeehaw
    /GIB the Damn MiniGame!

Similar Threads

  1. [TuT] hacking/cheating flash games with CE
    By bjorn1213 in forum Programming Tutorials
    Replies: 4
    Last Post: 06-07-2010, 07:39 AM
  2. [Vid tut] Basic Game Hacking
    By Matrix_NEO006 in forum Programming Tutorials
    Replies: 5
    Last Post: 01-02-2010, 10:43 AM
  3. [TUT] Basic Cheat Engine tutorial for begginers
    By rawr161 in forum Programming Tutorials
    Replies: 2
    Last Post: 08-14-2009, 06:41 AM
  4. [PIC TuT] Login screen
    By m60 in forum Visual Basic Programming
    Replies: 2
    Last Post: 01-13-2009, 12:28 AM
  5. [TUT] Gray Screen saver on warrock
    By ktalin91 in forum WarRock Korea Hacks
    Replies: 0
    Last Post: 05-12-2007, 07:45 PM