home *** CD-ROM | disk | FTP | other *** search
- top = vol._y;
- left = vol._x;
- right = vol._x;
- bottom = vol._y + 100;
- vol.onPress = function()
- {
- startDrag("vol",0,left,top,right,bottom);
- dragging = true;
- };
- vol.onRelease = function()
- {
- stopDrag();
- dragging = false;
- };
- vol.onReleaseOutside = function()
- {
- dragging = false;
- };
- this.onEnterFrame = function()
- {
- if(dragging)
- {
- level = 100 - (vol._y - top);
- }
- else if(level > 100)
- {
- level = 100;
- }
- else if(level < 0)
- {
- level = 0;
- }
- else
- {
- vol._y = - level + 100 + top;
- }
- value = 0.5 + level / 100;
- };
-