A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: MovieClip HELP!

  1. #1
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864

    MovieClip HELP!

    Hi!

    I am creating a game named: Space Attacker.

    THe whole thing is to avoid the enemies... If you get touched, you die!

    The problem:

    I've made the avoider, and you know the little thing that looks like a plus.. In the middle of a movieclip.. That thing.. When the enemies comes near by the avoider, the avoider doesent die! The avoider only dies when the enemy touches the the area where that little thing is! And the avoider isnt controlled by the keyboard arrow keys. You have to avoid with the mouse. So i've created MC and put a script in it, that makes the mouse changed into the MC! UNDerstanding?

    "Sorry for my BAD, english"
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  2. #2
    Member
    Join Date
    Feb 2008
    Posts
    83
    Please post the code.

  3. #3
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Enemy: on (release, rollOver) {
    gotoAndPlay("Scene 2", 1);
    }

    Avoider: onClipEvent(enterFrame){
    Mouse.hide();
    customCursorMC._x = _root._xmouse;
    customCursorMC._y = _root._ymouse;
    }

    onClipEvent (load) {
    Mouse.hide ();
    startDrag (this, true);
    }

    The Avoider is not so big, but its bigger than the little plus sign!
    And you dont get to scene 2 if the enemy doesnt touches the middle of the avoider..
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  4. #4
    Member
    Join Date
    Feb 2008
    Posts
    83
    You need to add a hittest to see if the enemy is touching the avoider.

    code:
     if (enemy_mc.hitTest(avoider_mc)) {avoider_mc.removeMovieClip;}


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