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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:33:26+00:00 2026-06-13T09:33:26+00:00

I need to make a fast forward button and rewind button I have everything

  • 0

I need to make a fast forward button and rewind button I have everything thing else just need those two and I’m not sure how to do it. Also I’m using Flash, Action script 3

I have looked at a bunch of examples but all of them do it differently then me. This is the way I learned how to load tracks and make play and pause buttons, but im not sure how to add rewind and forward

Here is what I have so far:

import flash.media.Sound;
import flash.media.SoundChannel;

import flash.net.URLRequest;

import flash.events.MouseEvent;
import flash.events.Event;

var myChannel:SoundChannel = new SoundChannel;
var track:Sound;

var trackToLoad:String;
var trackName:String;
var trackTime:String;




function stopTrack(e:MouseEvent) :void {
        myChannel.stop();
}

function reStartTrack(e:MouseEvent) :void {
        myChannel.stop();
        myChannel = track.play();
}


function playTrack(e:MouseEvent) :void {
        switch(e.target.name) {
    case "track1":
    trackToLoad = "musicForImport/11 Everlong.mp3";
    trackName = "Foo Fighters • Everlong"
    break;

    case "track2":
    trackToLoad = "musicForImport/02 War Is a Cemetery.mp3";
    trackName = "Gob • War is a Cemetery"
    break;

    case "track3":
    trackToLoad = "musicForImport/03 The Wind Cries Mary [Stereo].mp3";
    trackName = "Jimi Hendrix • The Wind Cries Mary"
    break;

    case "track4":
    trackToLoad = "musicForImport/03 Work.mp3";
    trackName = "Jimmy Eat World • Work"
    break;

    case "track5":
    trackToLoad = "musicForImport/02 Jumpin' Jack Flash.mp3";
    trackName = "The Rolling Stones • Jumpin' Jack Flash"
    break;

    case "track6":
    trackToLoad = "musicForImport/04 Don't Walk Away Eileen.mp3";
    trackName = "Sam Roberts • Don't Walk Away Eileen"
    break;

    case "track7":
    trackToLoad = "musicForImport/Brace Yourself.mp3";
    trackName = "State of Us • Brace Yourself"
    break;

    case "track8":
    trackToLoad = "musicForImport/02 Wrong Way.mp3";
    trackName = "Sublime • Wrong Way"
    break;

    case "track9":
    trackToLoad = "musicForImport/04 Fat Lip.mp3";
    trackName = "Sum 41• Fat Lip"
    break;

    case "track10":
    trackToLoad = "musicForImport/The Boys Are Back In Town.mp3";
    trackName = "Thin Lizzy • The Boys Are Back In Town"
    break;
}

track = new Sound;
track.load(new URLRequest(trackToLoad));
myChannel.stop();
myChannel = track.play();

displayTrackName.text = ":: " + trackName + " ::";
displayTrackName.x  = 103;
displayTrackName.y  = 440;
}

track1.addEventListener(MouseEvent.CLICK, playTrack);
track2.addEventListener(MouseEvent.CLICK, playTrack);
track3.addEventListener(MouseEvent.CLICK, playTrack);
track4.addEventListener(MouseEvent.CLICK, playTrack);
track5.addEventListener(MouseEvent.CLICK, playTrack);   
track6.addEventListener(MouseEvent.CLICK, playTrack);
track7.addEventListener(MouseEvent.CLICK, playTrack);
track8.addEventListener(MouseEvent.CLICK, playTrack);
track9.addEventListener(MouseEvent.CLICK, playTrack);
track10.addEventListener(MouseEvent.CLICK, playTrack);

stopTrackButton.addEventListener(MouseEvent.CLICK, stopTrack);
playTrackButton.addEventListener(MouseEvent.CLICK, reStartTrack);
  • 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-13T09:33:27+00:00Added an answer on June 13, 2026 at 9:33 am

    Rewind and forward functionality is implemented by Timer:

    import flash.media.Sound;
    import flash.events.MouseEvent;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    import flash.media.SoundChannel;
    
    const REWIND_SPEED:int = 1000;
    
    var sound:Sound = new MySound();
    var timer:Timer = new Timer(100);
    var soundChannel:SoundChannel;
    var oldSoundChannel:SoundChannel; 
    
    soundChannel = sound.play();
    
    rewindBtn.addEventListener(MouseEvent.CLICK, rewindBtn_clickHandler);
    stopRewindBtn.addEventListener(MouseEvent.CLICK, stopRewindBtn_clickHandler);
    timer.addEventListener(TimerEvent.TIMER, timer_timerHandler);
    
    function rewindBtn_clickHandler(event:MouseEvent):void
    {
    timer.start();
    }
    
    
    function stopRewindBtn_clickHandler(event:MouseEvent):void
    {
    timer.stop();
    }
    
    function timer_timerHandler(event:TimerEvent):void
    {
    if (!soundChannel)
        return;
    
    if (soundChannel.position == sound.length)
    {
        timer.stop();
    }
    else
    {
            oldSoundChannel = soundChannel; 
        soundChannel = sound.play(oldSoundChannel.position + REWIND_SPEED);
        oldSoundChannel.stop();
    }
    

    }

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

Sidebar

Related Questions

I have a quick question should be easy, but need to make it fast
I have a high traffic website and I need make sure my site is
I need to make a series (1-20) ajax calls and I need to have
I have a large xml file (1Gb). I need to make many queries on
I have an Image. I need to make a exactly copy of it and
Is there a way to rewind/fast forward (or at least start playing at a
Summary: I'm developing a persistent Java web application, and I need to make sure
I have a server that generates pngs very rapidly and I need to make
My project in some part need GPU acceleration to make a fast translation, but
I need make some action (dump statistical data) before the Dart program ends. The

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.