<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>中文Flex例子 &#187; useDuration.</title>
	<atom:link href="http://blog.minidx.com/tag/useduration/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.minidx.com</link>
	<description>中文Adobe Flex例子,Flex实例教程,RIA资源,全文检索技术,算法和数据结构</description>
	<lastBuildDate>Thu, 31 Mar 2011 03:22:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Flex中通过duration和useDuration属性设置声音效果长短的例子</title>
		<link>http://blog.minidx.com/2008/08/27/1321.html</link>
		<comments>http://blog.minidx.com/2008/08/27/1321.html#comments</comments>
		<pubDate>Wed, 27 Aug 2008 13:14:32 +0000</pubDate>
		<dc:creator>Minidxer</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[duration]]></category>
		<category><![CDATA[SoundEffect]]></category>
		<category><![CDATA[useDuration.]]></category>

		<guid isPermaLink="false">http://blog.minidx.com/2008/08/27/1321.html</guid>
		<description><![CDATA[接下来的例子演示了Flex中如何通过duration和useDuration属性，设置声音效果长短。
让我们先来看一下Demo（可以右键View Source或点击这里察看源代码）：









下面是完整代码(或点击这里察看)：
Download: main.mxml&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62;
&#60;mx:Application&#160;name=&#34;SoundEffect_useDuration_test&#34;
&#160; &#160; &#160; &#160; xmlns:mx=&#34;http://www.adobe.com/2006/mxml&#34;
&#160; &#160; &#160; &#160; layout=&#34;vertical&#34;
&#160; &#160; &#160; &#160; verticalAlign=&#34;middle&#34;
&#160; &#160; &#160; &#160; backgroundColor=&#34;white&#34;&#62;
&#160;
&#160; &#160; &#60;mx:SoundEffect&#160;id=&#34;soundEffect&#34;
&#160; &#160; &#160; &#160; &#160; &#160; source=&#34;http://www.helpexamples.com/flash/sound/song1.mp3&#34;
&#160; &#160; &#160; &#160; &#160; &#160; useDuration=&#34;{checkBox.selected}&#34;
&#160; &#160; &#160; &#160; &#160; &#160; duration=&#34;{slider.value}&#34;&#160;/&#62;
&#160;
&#160; &#160; &#60;mx:ApplicationControlBar&#160;dock=&#34;true&#34;&#62;
&#160; &#160; &#160; &#160; &#60;mx:Form&#160;styleName=&#34;plain&#34;&#62;
&#160; &#160; &#160; &#160; &#160; &#160; &#60;mx:FormItem&#160;label=&#34;useDuration:&#34;&#62;
&#160; &#160; &#160; [...]]]></description>
		<wfw:commentRss>http://blog.minidx.com/2008/08/27/1321.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.helpexamples.com/flash/sound/song1.mp3" length="339517" type="audio/mpeg" />
		</item>
		<item>
		<title>Flex中利用SoundEffect类动态显示MP3文件的ID3信息</title>
		<link>http://blog.minidx.com/2008/03/08/552.html</link>
		<comments>http://blog.minidx.com/2008/03/08/552.html#comments</comments>
		<pubDate>Fri, 07 Mar 2008 16:51:51 +0000</pubDate>
		<dc:creator>Minidxer</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[ID3]]></category>
		<category><![CDATA[ID3Info]]></category>
		<category><![CDATA[isPlaying]]></category>
		<category><![CDATA[SoundEffect]]></category>
		<category><![CDATA[uration]]></category>
		<category><![CDATA[useDuration.]]></category>

		<guid isPermaLink="false">http://blog.minidx.com/2008/03/08/552.html</guid>
		<description><![CDATA[在之前的利用Flex的Sound类动态显示导入MP3文件时的ID3信息中，我们了解了如何利用Sound类将一个MP3文件load到Flex中。接下来的例子展示了如何利用SoundEffect类，动态读入MP3文件并且播放，以及访问Sound对象和它的ID3信息。
注意：源代码的压缩包中并没有包括全部的MP3文件，你可以到http://ghosts.nin.com/main/order_options下载它们.万岁，免费的 Nine Inch Nails(乐队名称)歌曲以及创作共用许可(Creative Commons licensing)!
下面是全部的代码：








Download: main.mxml&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62;
&#60;!-- http://blog.flexexamples.com/2008/03/05/displaying-a-dynamically-loaded-mp3-files-id3-information-in-flex-using-the-soundeffect-class/ --&#62;
&#60;mx:Application&#160;xmlns:mx=&#34;http://www.adobe.com/2006/mxml&#34;
&#160; &#160; &#160; &#160; layout=&#34;vertical&#34;
&#160; &#160; &#160; &#160; verticalAlign=&#34;middle&#34;
&#160; &#160; &#160; &#160; backgroundColor=&#34;white&#34;&#62;
&#160;
&#160; &#160; &#60;mx:Script&#62;
&#160; &#160; &#160; &#160; &#60;![CDATA[
&#160; &#160; &#160; &#160; &#160; &#160; import&#160;mx.utils.ObjectUtil;
&#160;
&#160; &#160; &#160; &#160; &#160; &#160; private&#160;const NIN_URL:String = &#34;http://ghosts.nin.com/&#34;;
&#160;
&#160; &#160; &#160; &#160; &#160; &#160; private&#160;function playSoundEffect(src:String):void {
&#160; &#160; &#160; &#160; [...]]]></description>
		<wfw:commentRss>http://blog.minidx.com/2008/03/08/552.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching using disk
Object Caching 222/445 objects using disk

Served from: blog.minidx.com @ 2012-02-09 16:38:53 -->
