A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: if frame is greater than...

  1. #1
    I'm dope. Psytrix's Avatar
    Join Date
    Aug 2002
    Location
    Slidell, LA
    Posts
    309

    if frame is greater than...

    im workin on a game:

    http://www.geocities.com/fivehitcombo

    but when you shoot the badguy while he is already in a death animation, he will restart the death animation. so i was thinkin need a statement on the enemy's mc that said "if frame is greater than 18(begining of death animation) then dont play the animation again...how do i do this? surely the use of ! somewhere???

  2. #2
    I'm dope. Psytrix's Avatar
    Join Date
    Aug 2002
    Location
    Slidell, LA
    Posts
    309
    heres what im using now to trigger the play of the death animation, if this is needed...
    Code:
    onClipEvent (mouseDown) {
    	if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
    		gotoAndPlay(19);
    	}
    }
    how do i do what i need to do for this? i dont know the proper syntax.
    Last edited by Psytrix; 11-27-2002 at 02:03 AM.

  3. #3
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002
    Code:
    onClipEvent (mouseDown) {
    	if (dead!=true && this.hitTest(_root._xmouse, _root._ymouse, true)) {
                    dead=true;
    		gotoAndPlay(19);
    	}
    }
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  4. #4
    Senior Member mbenney's Avatar
    Join Date
    Mar 2001
    Posts
    2,744
    alternatively you could just check the _currentframe property of the movie clip using methods like

    if (_root.badguy._currentframe == 1) {
    // do death animation
    }

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