Skip to content

Instantly share code, notes, and snippets.

@jamieshepherd
Created March 27, 2015 10:55
Show Gist options
  • Save jamieshepherd/e46bb1102a37f2091a58 to your computer and use it in GitHub Desktop.
Save jamieshepherd/e46bb1102a37f2091a58 to your computer and use it in GitHub Desktop.
Loop music Flash AS2
// Background music
this.createEmptyMovieClip("m",_root.getNextHighestDepth());
audioVolume = 50;
backgroundMusic = new Sound(m);
backgroundMusic.attachSound("background-music");
backgroundMusic.setVolume(audioVolume);
backgroundMusic.start(0,0);
backgroundMusic.onSoundComplete = function() { this.start(); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment