nchavie
Joined: 27 Feb 2007 Posts: 1
|
Posted: Tue Feb 27, 2007 3:07 am Post subject: Flash 8 MP3 Player help. Urgent |
|
|
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: |
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. |
|