home *** CD-ROM | disk | FTP | other *** search
- class mx.controls.streamingmedia.FullScreenToggleControl extends MovieClip
- {
- var toggle;
- var _enabled;
- var onRollOver;
- var onRollOut;
- var onRelease;
- function FullScreenToggleControl()
- {
- super();
- this.init();
- }
- function init()
- {
- this.toggle = this._parent;
- this.setEnabled(this.toggle.getEnabled());
- }
- function handleRollOver()
- {
- this.getController().setNotAnimating(true);
- }
- function handleRollOut()
- {
- this.getController().setNotAnimating(false);
- }
- function handleRelease()
- {
- this.toggle.toggleDisplay();
- }
- function getController()
- {
- return this.toggle.getPlayer().getController();
- }
- function getEnabled()
- {
- return this._enabled;
- }
- function setEnabled(is)
- {
- mx.controls.streamingmedia.Tracer.trace("FullScreenToggleControl.setEnabled: " + is);
- this._enabled = is;
- if(is)
- {
- this.onRollOver = this.handleRollOver;
- this.onRollOut = this.handleRollOut;
- this.onRelease = this.handleRelease;
- this.gotoAndStop("_up");
- }
- else
- {
- delete this.onRollOver;
- delete this.onRollOut;
- delete this.onRelease;
- this.gotoAndStop("_disabled");
- }
- }
- }
-