Flex Gumbo中如何创建无边框播放器的例子
By Minidxer | September 5, 2009
接下来的例子演示了Flex Gumbo中如何利用VideoElement控件,创建无边框播放器。
下面是完整代码(或点击这里察看):
下面是main.mxml:
- <?xml version="1.0" encoding="utf-8"?>
- <s:Application name="Spark_VideoElement_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">
- <mx:ApplicationControlBar width="100%" cornerRadius="0">
- <s:Button id="playBtn"
- label="play"
- click="videoElement.play();" />
- <s:Button id="pauseBtn"
- label="pause"
- click="videoElement.pause();" />
- <s:Button id="stopBtn"
- label="stop"
- click="videoElement.stop();" />
- <s:CheckBox id="mutedCheckBox"
- label="muted"
- selected="true"
- click="videoElement.muted = mutedCheckBox.selected;" />
- <s:Graphic>
- <s:SimpleText id="playheadTimeLabel"
- text="{videoElement.playheadTime.toFixed(3)}" />
- </s:Graphic>
- </mx:ApplicationControlBar>
- <s:Group horizontalCenter="0" verticalCenter="0">
- <s:VideoElement id="videoElement"
- autoRewind="true"
- source="http://helpexamples.com/flash/video/cuepoints.flv"
- muted="true"/>
- </s:Group>
- </s:Application>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子
Topics:
Gumbo, Other |
No Comments » |
Tags: Gumbo, VideoElement