# Swaping the volume slider to left is off and right is on

**URL:** <https://forum.kirupa.com/t/swaping-the-volume-slider-to-left-is-off-and-right-is-on/35460>\
**Category:** Uncategorized\
**Created:** [November 14, 2003, 6:32am UTC](https://forum.kirupa.com/t/swaping-the-volume-slider-to-left-is-off-and-right-is-on/35460 "2003-11-14T06:32:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sccratchy](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@sccratchy](https://forum.kirupa.com/u/sccratchy)\
**Post date:** [November 14, 2003, 6:32am UTC](https://forum.kirupa.com/t/swaping-the-volume-slider-to-left-is-off-and-right-is-on/35460/1 "2003-11-14T06:32:51Z")

</div>

hey guys,

i’m using this code for a volume slider. ATM the moment, left it on and right is off. What do I need to change so that left is off and right is on?

thxs!

[AS]  
onClipEvent (load) {  
top = \_y;  
bottom = \_y;  
left = \_x;  
right = left+100;  
}  
onClipEvent (enterFrame) {  
if (dragging == true) {  
\_root.soundObject.setVolume(100-(\_x-left));  
}  
}  
[/AS]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 14, 2003, 9:11am UTC](https://forum.kirupa.com/t/swaping-the-volume-slider-to-left-is-off-and-right-is-on/35460/2 "2003-11-14T09:11:21Z")

</div>

\_root.soundObject.setVolume(\_x-left);

I think that will work.

–EP

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 14, 2003, 12:41pm UTC](https://forum.kirupa.com/t/swaping-the-volume-slider-to-left-is-off-and-right-is-on/35460/3 "2003-11-14T12:41:08Z")

</div>

cool, big thanks!!! its works
