Search  

MYSOUNDCONTROLLER

HomeBrowse CategoriesFlashApplications and UtilitiesUtilitiesmySoundController

A background audio(loaded externally) controller with fade in/out transition.

suitable for sites with small looping ambience

Note:Song included is for demo purpose only.

To make a loop
on line 36 & 93 in frame 15’s actionscript, change

myAudio.start(); 
to
myAudio.start(0, 999999);
the 1st value is to offset the music and the 2nd is the number of times it should loop

Posted about 1 year ago

I love this file and have used it regularly. I would like to know if there is a way to have the initial volume go to 50% and stop. Is this possible? Thanks.

Posted about 1 year ago

yea sure :) try this:

in actionscript frame 15, inside audio_controller mc add this function somewhere after the startMusic function:

initiateMusic = function () {
    drg.enabled = true;
    ply.enabled = false;
    stp.enabled = true;
    ply._alpha = 50;
    stp._alpha = 100;
    ply.gotoAndPlay("out");
    //
    myAudio.start();
    inc = 0;
    this.onEnterFrame = function() {
        inc = inc+5;
        if (inc<55) {
            vol._visible = true;
            drg._x = drgOriPos+inc;
            vol._x = drg._x-vol._width/2;
            myAudio.setVolume(inc);
            vol.vol.text = myAudio.getVolume();
        } else {
            vol._visible = false;
            delete this.onEnterFrame;
        }
    };
};

if (inc<55) { ... if 50 is your preferred value just add 5 to the statement in the if argument.

next, at the end of the code remove startMusic(); and add initiateMusic();

Posted about 1 year ago

Thanks! Seemed like it worked. Great file.

Posted about 1 year ago

Hey man, awsome file but I changed the line of code to stream my audio the code is this:

// load the sound, false = non-straming song, only played when its completely loaded
myAudio.loadSound(songFile, true);
//

you have it set to false by default. The thing is, it does stream but then when the track loads fully it starts again, how would I prevent this?

thanks.

Posted 11 months ago

Hi,

I’m looking for a controller that will play background music on a website.

It would load up on the homepage, then continue to play the loop across all pages, without restarting whenever I go to a new page. Seamless background music

Will this do it??

thx

john

Posted 11 months ago

hey john, when you say ‘go to a new page’ do you mean within a full flash site or jumping between htmls ? if its between html, quite impossible.

the least is that you can use flash based cookies to store the value of the volume & song choice like how its done on youtube. (none of these features are provided in my file)

if its a full flash site then yes, you can keep the continuity of the music.

Posted 11 months ago

Hi “en”,

thanks for the response. Yes, I (my client) wanted it to run across html pages of a website, not within a Flash movie or site.

I saw some code a few months ago about “embedding” with a loop function , but that didn’t work…oh well.

I’ll keep lookin’ thx,

john

Posted 11 months ago

Hey John!

Maybe build the site with an swf file in an iframe, then it would stay loaded even if the page content changes.

Just a thought.

Posted 5 months ago

Hey John! Use iframe

Exactly!

Example: http://www.radiodesatados.com

Posted 2 months ago

Sorry jejeje…

http://www.desatadosradio.com

Posted 2 months ago

I want the sound to stop and press play to begin.

Please help.

Posted 2 months ago