  | | | Sound problem - Nobody? | Sound problem - Nobody? 2004-03-04 - By Christophe
Back
-- --Original Message-- -- From: Christophe [mailto:frizzle@(protected)] Sent: maandag 1 maart 2004 23:43 To: flashnewbie@(protected) Subject: [Flashnewbie]Sound problem
Hi,
I have a volume slider that works ok and a mute button that works ok. But when I combine the two the mute button doesn't work properly anymore. The sound mutes (when there's volume), but doesn't "unmute" anymore.
Can anyone tell me where I went wrong?
var drag:Boolean; var muteVar:Boolean = false; muteButtonPos = function () { if (muteVar == false) { _root.rack_mc.mute_mc.gotoAndStop("unmute"); } else { _root.rack_mc.mute_mc.gotoAndStop("mute"); } }; _root.rack_mc.v_slider_mc.v_rechthoek_mc.onPress = function() { drag = true; }; _root.rack_mc.v_slider_mc.v_rechthoek_mc.onReleaseOutside = function() { drag = false; }; _root.rack_mc.v_slider_mc.v_rechthoek_mc.onRelease = function() { drag = false; }; _root.onEnterFrame = function() { var sliderposition:Number = _root.rack_mc.v_slider_mc.v_rechthoek_mc._x; if (drag) { _root.rack_mc.v_slider_mc.v_rechthoek_mc._x = _root.rack_mc.v_slider_mc._xmouse; if (_root.rack_mc.v_slider_mc.v_rechthoek_mc._x<=0) { _root.rack_mc.v_slider_mc.v_rechthoek_mc._x = 0; muteVar = true; muteButtonPos(); } if (_root.rack_mc.v_slider_mc.v_rechthoek_mc._x>=100) { _root.rack_mc.v_slider_mc.v_rechthoek_mc._x = 100; } if (_root.rack_mc.v_slider_mc.v_rechthoek_mc._x>0 && _root.rack_mc.v_slider_mc.v_rechthoek_mc._x<100) { muteVar = false; muteButtonPos(); } _root.globalvolume.setVolume(sliderposition); } _root.rack_mc.mute_mc.onRelease = function() { if (_root.globalvolume.getVolume()>0 && muteVar == false) { _root.globalvolume.setVolume(0); muteVar = true; muteButtonPos(); } else if (_root.globalvolume.getVolume()>0 && muteVar == true) { _root.globalvolume.setVolume(sliderposition); muteVar = false; muteButtonPos(); } if (_root.globalvolume.getVolume() == 0) { muteVar = true; muteButtonPos(); } else { _root.globalvolume.setVolume(sliderposition); muteVar = false; muteButtonPos(); } }; };
Thx Christophe
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Supported by Fig Leaf Software -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Lower Prices for Certified Training! Check out new lower prices for Certified Macromedia Training from Fig Leaf Software. Expand your skill set with courses in ColdFusion, Flash, Rich Internet Applications and .NET in the new year. Fig Leaf Software provides the highest caliber instruction at our training centers in Washington D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location.
Get the details at http://training.figleaf.com/ -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe, e-mail: flashnewbie-unsubscribe@(protected) For additional commands, e-mail: flashnewbie-help@(protected)
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Supported by Fig Leaf Software -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Lower Prices for Certified Training! Check out new lower prices for Certified Macromedia Training from Fig Leaf Software. Expand your skill set with courses in ColdFusion, Flash, Rich Internet Applications and .NET in the new year. Fig Leaf Software provides the highest caliber instruction at our training centers in Washington D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location.
Get the details at http://training.figleaf.com/ -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe, e-mail: flashnewbie-unsubscribe@(protected) For additional commands, e-mail: flashnewbie-help@(protected)
|
|
 |