Ok I see in the original mx.controls.VideoDisplay it checks autoplay
and either plays or loads the video -- however why can't I override
this function?
private function autoPlaying():void
{
if (_source)
{
// Start playing or loading.
if (_autoPlay)
play();
else
load();
// Seek to playheadTime now if specified.
if (!isNaN(_playheadTime))
{
asCuePointIndexResetPending = Boolean(_playheadTime
>= 0);
videoPlayer.seek(_playheadTime);
}
}
}
On Aug 6, 2009, at 8:39 AM, grimmwerks wrote:
Well I've followed countless examples to add smoothing to flex by
extending VideoDisplay, but for some reason setting the autoPlay to
be false doesn't change the videoDisplay autoPlay.
Anybody have any ideas?
import flash.display.DisplayObject;
import mx.controls.VideoDisplay;
import mx.controls.videoClasses.VideoPlayer;
import mx.managers.IFocusManagerComponent;
public clas s SmoothVideo extends VideoDisplay implements
IFocusManagerComponent
{
public var smoothing:Boolean=false;
public var deblock ing:int=0;
public function SmoothVideo()
{
super();
}
override public function
addChild(child:DisplayObject):DisplayObject
{
var video:VideoPlayer = VideoPlayer(child);
video.smoothing=smoothing;
video.deblocking=deblocking;
return super.addChild(child);
}
}
}