Help - Search - Members - Calendar
Full Version: Music for your Website
Flexbeta > General > General > Sound Studio
o0f
I prefer using flash (with mp3 encoding) to put music on my websites.

i create a simple two-button flash movie. Play and Stop.

Play code (actions):
CODE
on (release) {
    
    //Stop Sound Behavior
    _global.Behaviors.Sound.sndAudio.stop("sndAudio");
    
    // Play Sound Behavior
    _global.Behaviors.Sound.sndAudio.start(0,1);
    // End Play Sound Behavior

}


Stop code:
CODE
on (release) {

    //Stop Sound Behavior
    _global.Behaviors.Sound.sndAudio.stop("sndAudio");

}


Frame 1 code:
CODE
//Play Internal Sound Behavior
    if(_global.Behaviors == null)_global.Behaviors = {};
    if(_global.Behaviors.Sound == null)_global.Behaviors.Sound = {};
    if(typeof this.createEmptyMovieClip == 'undefined'){
 this._parent.createEmptyMovieClip('BS_sndAudio',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
 _global.Behaviors.Sound.sndAudio = new Sound(this._parent.BS_sndAudio);
    } else {
 this.createEmptyMovieClip('_sndAudio_',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
 _global.Behaviors.Sound.sndAudio = new Sound(this.BS_sndAudio);
    }
    _global.Behaviors.Sound.sndAudio.attachSound("sndAudio");
    if (true) {
 _global.Behaviors.Sound.sndAudio.start(0,1);
    }
    //End Behavior


and import any Audio file you want into your Library. Rename the Audio Component to sndAudio (in your libary). Right click and click "Linkage Properties." Click "Export for ActionScript" and click OK. Right click sndAudio again and click "Export Settings" choose MP3 compression and change compression to fit your tastes/sizes.

Not sure if this is very practical alone except for blogs where the visitor can click STOP. You can probably code cookies so when they change to a different page it doesn't start playing again blah blah blah blah. i like it so leave me alone.
OutlandishTrendz
Nice lil tip, but anymore when I come to a site with music and no way to shut it off or anything.... very annoying. Music on websites was back when frames were the 1337.
o0f
nothing more annoying than website music challenging your cd
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.