Here is the action script for the mp3 player:
- Code: Select all
var myAudio_sound:Sound = new Sound();
myAudio_sound.attachSound("sound_ebonicsID");
playbtn.onRelease = function() {
myAudio_sound.start(0,1);
};
stopbtn.onRelease = function() {
myAudio_sound.stop();
};
vol_up_btn.onRelease = function() {
myAudio_sound.setVolume(100);
};
vol_down_btn.onRelease = function() {
myAudio_sound.setVolume(0);
};
l_spk_btn.onRelease = function() {
myAudio_sound.setPan(-100);
};
r_spk_btn.onRelease = function() {
myAudio_sound.setPan(100);
};
c_spk_btn.onRelease = function() {
myAudio_sound.setPan(0);
};
slider_mc.onPress = function() {
this.startDrag(false,
_root.groove_mc._x,
_root.groove_mc._y - 100,
_root.groove_mc._x,
_root.groove_mc._y);
};
slider_mc.onRelease = function() {
stopDrag();
};
slider_mc.onMouseMove = function() {
var myPoint:Object = new Object();
myPoint.x = this._x;
myPoint.y = this._y;
_root.groove_mc.globalToLocal(myPoint);
myAudio_sound.setVolume(-myPoint.y);
};
Any ideas?
Thanks.


