A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: luddite needs help with shooting game!

  1. #1
    Junior Member
    Join Date
    Jan 2005
    Posts
    13

    luddite needs help with shooting game!

    Hi all, I was hoping someone could help me, I'm making a shooting game and want to be able to show damage in the areas the user has just pressed. For instance at the moment I have a movieclip which contains the an arm, I want to be able to click on the arm, and for that action to spawn a 'damage' movie clip at the point the arm was clicked. Is there any way to do this?

    At the moment, I have lots of movieclips covering the arm, which when are hit show damage. This doesn't seem a very elegant option!

    Please help if you can.

    Thanks,

  2. #2
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    make a movieclip called explosion or something that is an animation of the effect you want. in the last frame put some code that hides it by setting explosion._visible=false;
    Attached Files Attached Files

  3. #3
    Junior Member
    Join Date
    Jan 2005
    Posts
    13
    Thanks, I wanted to be able to spawn multiple instances of the movieclip depending on where the mouse is pressed. Would something like this work at all for this purpose?

    var Mode = "NewWhateverMc";
    this.onMouseDown = function () {
    if (Mode == "NewWhateverMc") {
    var idName = "WhateverMc";
    var depth = _root.getNextHighestDepth ();
    var mcName = "WhateverMc" + depth;
    _root.attachMovie (idName,mcName,depth,{_x:_xmouse, _y:_ymouse});
    if (!Key.isDown (Key.SHIFT)) {
    Mode = "SomethingElse";
    }
    }
    };
    newWhateverMcButton.onRelease = function () {
    Mode = "NewWhateverMc";
    };

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