Código Actionscript:
Ver original
#initclip 50 function mcVolumeControl() { this.onLoad = this.on_load; } // End of the function mcVolumeControl.prototype = new MovieClip(); mcVolumeControl.prototype.on_load = function () { if (this.xo != undefined) { this._x = this.xo; } // end if if (this.yo != undefined) { this._y = this.yo; } // end if if (this.so != undefined) { this._xscale = this._yscale = this.so; } // end if if (this.color != undefined) { var color = new Color(this.mc_speaker); color.setRGB(this.color); var color = new Color(this.mc_bar); color.setRGB(this.color); var color = new Color(this.mc_border); color.setRGB(this.color); var color = new Color(this.txt_volume); color.setRGB(this.color); } // end if if (this.shadow != undefined) { var _loc3 = new flash.filters.DropShadowFilter(this.shadow.distance, this.shadow.angle, this.shadow.color, 8.000000E-001, 5, 5); this.filters = [_loc3]; } // end if if (this.show_percent == false) { this.txt_volume._visible = false; } // end if this.global_sound = new Sound(); this.mc_bar.setMask(this.mc_mask); this.goto_level = this.global_sound.getVolume(); if (this.vo != undefined) { this.goto_level = this.vo; this.global_sound.setVolume(this.vo); } // end if this.onEnterFrame = this.on_enter; this.mc_speaker.onRelease = function () { if (this._parent.vol_level > 0) { this.old_volume = this._parent.vol_level; var _loc2 = 0; } else if (this.old_volume == undefined) { _loc2 = 50; } else { _loc2 = this.old_volume; } // end else if this._parent.goto_level = _loc2; }; this.mc_border.onPress = function () { this.is_press = true; }; this.mc_border.onRelease = this.mc_border.onReleaseOutside = function () { this.is_press = false; }; this.mc_border.onEnterFrame = function () { if (this.is_press == true) { var _loc2 = Math.max(this._parent.mc_bar._xmouse + 1, 0); var _loc3 = this._parent.mc_bar._width; _loc2 = Math.min(_loc2, _loc3); _loc2 = 100 * _loc2 / _loc3; this._parent.goto_level = _loc2; } // end if }; }; mcVolumeControl.prototype.on_enter = function () { this.vol_level = this.global_sound.getVolume(); var _loc2 = this.goto_level - this.vol_level; if (Math.abs(_loc2) > 5) { this.vol_level = this.vol_level + _loc2 / 4; } else { this.vol_level = this.vol_level + _loc2; } // end else if this.mc_mask._xscale = this.vol_level; var _loc3 = Math.round(this.vol_level); this.txt_volume.text = _loc3; this.mc_speaker.mc_wave_3._visible = this.vol_level > 66; this.mc_speaker.mc_wave_2._visible = this.vol_level > 33; this.mc_speaker.mc_wave_1._visible = this.vol_level > 0; this.global_sound.setVolume(Math.round(this.vol_level)); }; Object.registerClass("mcVolumeControl", mcVolumeControl); #endinitclip
Profa ayudenme no entindo mucho de este lenguaje...