It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Flash Forum

Flash 8 MP3 Player help. Urgent

Moderator: Phate

Flash 8 MP3 Player help. Urgent

Postby nchavie on Tue Feb 27, 2007 2:07 am

I have created a very basic MP3 player in flash that works just fine. However when I place all of the buttons and movie clips in to another movie clip (in another .fla file) the volume slider doesn't work. Everything else works just fine except the volume slider. As soon as you click it the slide bar jumps to the upper left corner of the screen. I am certain it is a really simple fix but for the life of me I can't figure it out.

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.
nchavie
 
Posts: 0
Joined: Tue Feb 27, 2007 2:04 am

Who is online

Users browsing this forum: No registered users and 0 guests