Well, I got it working to my satisfaction. Definitely hacky, but at least it works. In case anyone else is looking for this, the code used is below (the FLVPlayback component instance name is "videoScreen").

//////////////////////////// BEGIN CODE ////////////////////////////

private function enableVideoControls( set_enabled:Boolean )
   {
       trace("enableVideoControls, to: " + set_enabled );
// ensure that we have modified the controls to understand being disabled
       backupControlFunctions();
for (var i : Number = 0; i < videoScreen["_uiMgr"].controls.length; i++) {
           videoScreen["_uiMgr"].controls[i].disabled = !set_enabled;
       }
   }
private function backupControlFunctions()
   {
for (var i : Number = 0; i < videoScreen["_uiMgr"].controls.length; i++) {
           var videoControl = videoScreen["_uiMgr"].controls[i];
if ( typeof(videoControl) == "movieclip" &&
                videoControl._name != "volumeBar_mc" &&
                videoControl._name != "volumeBarHandle_mc" &&
                videoControl._name != "volumeMute_mc" &&
                videoControl._name != "on_mc" &&
                videoControl._name != "off_mc"){
trace("backupControlFunctions for videoControl " + videoControl); if ( videoControl.oldOnPress == undefined && videoControl.onPress != undefined ){
                   videoControl.oldOnPress = videoControl.onPress;
                   videoControl.onPress = function(){
trace("onPress on " + this + " disabled: " + this.disabled );
                       if (this.disabled != true){
                           this.oldOnPress.apply(this, arguments);
                       }
                   }
               }
if ( videoControl.oldOnRelease == undefined && videoControl.onRelease != undefined ){
                   videoControl.oldOnRelease = videoControl.onRelease;
                   videoControl.onRelease = function(){
trace("onRelease on " + this + " disabled: " + this.disabled );
                       if (this.disabled != true){
                           this.oldOnRelease.apply(this, arguments);
                       }
                   }
               }
if ( videoControl.oldOnReleaseOutside == undefined && videoControl.onReleaseOutside != undefined ){ videoControl.oldOnReleaseOutside = videoControl.onReleaseOutside;
                   videoControl.onReleaseOutside = function(){
trace("onReleaseOutside on " + this + " disabled: " + this.disabled );
                       if (this.disabled != true){
                           this.oldOnReleaseOutside.apply(this, arguments);
                       }
                   }
               }
           }
       }
   }

//////////////////////////// END CODE ////////////////////////////

Grant Cox wrote:

I would like to be able to toggle whether the controls for a Flash 8 FLVPlayback component are enabled. I don't want to hide them all (like the skinAutoHide attribute does), rather keep them visible but non-interactive. Preferably I would like to control this per item, as I would like to leave the audio controls interactive.

I have found there is an attribute FLVPlaybackInstance._uiMgr._controlsEnabled which enables and disables all of the button controls (although unfortunately not the seek bar). I am currently experimenting with enabling and disabling all of the mouse events for the movieclips in FLVPlaybackInstance._uiMgr.controls , but it isn't looking hopeful.

Regards,
Grant Cox
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to