Flex Gumbo – Toggling smoothing on Spark VideoPlayer
The following example shows how you can toggle smoothing on a Spark VideoPlayer object in Flex Gumbo by setting the Boolean smoothing property on the VideoPlayer object’s internal videoObject property.
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2009/05/24/toggling-smoothing-on-a-spark-videoplayer-object-in-flex-gumbo/ -->
<s:Application name="Spark_VideoPlayer_VideoElement_videoObject_smoothing_test"
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo">
<fx:Script>
<![CDATA[
private function checkBox_change(evt:Event):void {
videoPlayer.videoElement.videoObject.smoothing = checkBox.selected;
}
]]>
</fx:Script>
<s:CheckBox id="checkBox"
label="smoothing"
left="10"
top="10"
change="checkBox_change(event);" />
<s:Panel id="panel"
title="{videoPlayer.source}"
horizontalCenter="0"
verticalCenter="0">
<s:VideoPlayer id="videoPlayer"
source="http://helpexamples.com/flash/video/water.flv"
muted="true" />
</s:Panel>
</s:Application>