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

  • Home
  • SEARCH
  • 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 8421245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:05:54+00:00 2026-06-10T03:05:54+00:00

The gotoAndStop() method is called on the sound being loaded, the trace is fired

  • 0

The gotoAndStop() method is called on the sound being loaded, the trace is fired when the sound has finished. Any help would be greatly appreciated!

here is my code:

 import flash.events.Event;
import flash.media.Sound;
import flash.net.URLRequest;
var sound:Sound = new Sound();
var soundReq:URLRequest = new 
URLRequest("testmp3.mp3");
sound.load(soundReq);
sound.addEventListener(Event.COMPLETE, soundPlay);
function soundPlay(event:Event):void
{   
    var soundChannel:SoundChannel;
    soundChannel = sound.play();
    soundChannel.addEventListener(Event.SOUND_COMPLETE, soundComplete);
}
function soundComplete(event:Event):void
{
    trace("The sound has finished playing.");

    gotoAndStop(3);
}
  • 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-10T03:05:56+00:00Added an answer on June 10, 2026 at 3:05 am

    Think you’re mistaken.

    Event.COMPLETE called when sound file load completed.

    sound.addEventListener(Event.COMPLETE, soundPlay);
    

    Event.SOUND_COMPLETE called when sound playback ended.

    soundChannel.addEventListener(Event.SOUND_COMPLETE, soundComplete);
    

    refer a following code.


    import flash.events.Event;
    import flash.media.Sound;
    import flash.net.URLRequest;
    var sound:Sound = new Sound();
    var soundReq:URLRequest = new URLRequest("testmp3.mp3");
    sound.load(soundReq);
    sound.addEventListener(Event.COMPLETE, soundFileLoaded);
    function soundFileLoaded(event:Event):void
    {   
        trace("sound file loaded!");
    
        gotoAndStop(3);
        var soundChannel:SoundChannel;
        soundChannel = sound.play();
        soundChannel.addEventListener(Event.SOUND_COMPLETE, soundPlaybackEnded);
    }
    function soundPlaybackEnded(event:Event):void
    {
        trace("sound playback ended");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey Guys...need help. Working on a project and get this error on the Output
How do you tell the root timeline to root.gotoAndStop(2); from the timeline of a
I have a method which registers an event listener to each of the MovieClips
I hope I won't sound like an idiot, but this is my problem -
I have a game here, and I would like to add event handlers to
Is it possible to change a frame label within a gotoAndStop('label') with the parameters
What's the sanest way to achieve something along the lines of this.gotoAndStop(this._currentframe) ? What
I have one button for this slider. The slider has three sections. Frame 24
I am getting this error- TypeError: Error #1009: Cannot access a property or method
Hi to every 1 need your help with if in Flash AS3, it should

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.