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 3695392
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:36:44+00:00 2026-05-19T04:36:44+00:00

I am making a Flash game with a bird as the avatar. And when

  • 0

I am making a Flash game with a bird as the avatar. And when the bird picks up an Iron Bird pickup, the song Iron Man is played. But the problem is: It keeps making new instances of this audio. So I have like a hundred thousand Ozzy’s singing the song. But they have a delay of a second between each other. Is there a certain function to play the song only one time? Or a small script to get this done?

This is my script:

var IronManMusic:Sound = new IronManSong();
var IronManChannel:SoundChannel = new SoundChannel();

var backgroundMusic:Sound = new BackgroundMusic(); 
var myChannel:SoundChannel = new SoundChannel();
myChannel = backgroundMusic.play();

 if(ironbird==true){
  laatstejump = 9;
  myChannel.stop();
  IronManChannel = IronManMusic.play();
 }

The ironbird boolean is found in a Updatescreen function. I think this is the problem but I am not sure. Help is really appreciated! 🙂

  • 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-05-19T04:36:45+00:00Added an answer on May 19, 2026 at 4:36 am

    Hm… looks like it should be:

    if(ironbird==true) {
      [...]
      ironbird = false;
    }
    

    Or at least the Updatescreen function you mentioned should set ironbird back to false after one tick/iteration.

    EDIT: Looking at the code you posted as an answer, it’s even easier:

    You’re doing

    if(birdie.hitTestPoint(ironbirdpickup.x,ironbirdpickup.y,true)){
        ironbird = true;
        ironbirdpickup = Null;
    }
    
    if(ironbird==true){
        laatstejump = 9;
        myChannel.stop();
        IronManChannel = IronManMusic.play();
    }
    

    and use the ironbird variable for animation and other things. Moving the sound trigger should only trigger the sound once (or as often as hitTestPoint is triggered).

    if(birdie.hitTestPoint(ironbirdpickup.x,ironbirdpickup.y,true)){
        ironbird = true;
        ironbirdpickup = Null;
        myChannel.stop();
        IronManChannel = IronManMusic.play();
    }
    
    if(ironbird==true){
        laatstejump = 9;
    }
    

    You should still reset ironbird to false somewhere, f.e. when animation is done.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I built a slideshow/decision-making game in Flash but would like to try to redo
So I've been working on making a game in Processing but I think Flash
I am making a simple game in order to learn a new language. I
I'm thinking about making a networked game. I'm a little new to this, and
I'm making a Flash game which will be up on Facebook, I'm using Python/Django
I am making a flash game. And I want to know how big is
I'm making a multiplayer flash game that has a lot of graphics/code. I'm having
I'm making a multiplayer flash game in Actionscript 3.0, using Flash CS4 IDE. I'm
I'm making a bot for a Flash game, and I've figured out how to
I am making a small game in flash, I would like to track scores

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.