I want to toggle smoothing on a Spark VideoPlayer object in Flex Gumbo.
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>
NOTE: This entry is based on a beta version of the Flex Gumbo SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex Gumbo SDK.
For more information, see the original post (as well as many others) on FlexExamples.com.