Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8709973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:30:16+00:00 2026-06-13T04:30:16+00:00

I have a game in which a flight will shoot bullets and when the

  • 0

I have a game in which a flight will shoot bullets and when the bullet hits an enemy ship a blast effect comes and another frame loads. Now the problem i’m facing with is the blast effect and the next frame are loading at a time. So, I’ve added this script:

if (this.hitTest(_root["enemy1"])) {
    this.removeMovieClip();
    _root.enemy1._x=2000;
    _root.option1._x=2000;
    addExplosion(800, 200, explosionParticleAmount, explosionDistance, explosionSize, explosionAlpha);
    this._x=-900000;
    var sound:Sound = new Sound(this);
    sound.attachSound("explode");
    sound.start();
    flag = true;
    wait();
    checkAnswer(_root.option1.text);
}

function wait() {
  stop();
  var myInterval = setInterval(function () {
      play();
      clearInterval(myInterval);
  }, 5*1000); // stop for 5 seconds
}

function checkAnswer(answer){
  if(questions[level][1] == answer){  
     status_flag=true;
     score=score+10;
     bullet_fire=false;
     gotoAndStop(3);
  }else{
      bullet_fire=false;
     gotoAndStop("Scene 2",1);
  }
}

But still the result is same. I also tried increasing the time, but i am still unable to stop that another frame from pausing. Please help me out. Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T04:30:17+00:00Added an answer on June 13, 2026 at 4:30 am

    I think the following should work for you, though a more robust method would be to pause until you receive an event to signal that your explosion animation has completed. The problem with the current method is that if you change the length of your explosion sequence, you need to remember to update the length of your pause also.

    if (this.hitTest(_root["enemy1"])) {
        this.removeMovieClip();
        _root.enemy1._x=2000;
        _root.option1._x=2000;
        addExplosion(800, 200, explosionParticleAmount, explosionDistance, explosionSize, explosionAlpha);
        this._x=-900000;
        var sound:Sound = new Sound(this);
        sound.attachSound("explode");
        sound.start();
        flag = true;
        wait();
    }
    
    function wait() {
      stop();
      var myInterval = setInterval(function () {
          //play();
          checkAnswer(_root.option1.text); // check answer after explosion has finished
          clearInterval(myInterval);
      }, 5*1000); // stop for 5 seconds
    }
    
    function checkAnswer(answer){
      if(questions[level][1] == answer){  
         status_flag=true;
         score=score+10;
         bullet_fire=false;
         gotoAndStop(3);
      }else{
          bullet_fire=false;
         gotoAndStop("Scene 2",1);
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a core data class Game which has a to-many relationship to another
I have a Game class that has a -(void) play method which will be
I have made a game which is nearly identical to Popcap's Atomica. ( http://www.popcap.com/gamepopup.php?theGame=atomica
I have an animated game which is generally achieving 25-30 frames per second, though
I have an game app which occasionally plays sounds. When the phone goes into
I have a game app which is mostly working fine. If a phone call
I have an iPhone game which I am porting to PC. The game uses
Imagine you have a PlayN game which uses Guice bindings in its core project:
I have a Game Window to which I am trying to put W ,
I have an XNA arcade game which runs over Silverlight environment. The game has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.