<?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>DFdou&#039;s Blog &#187; TweenMax</title>
	<atom:link href="http://nwhy.org/tag/tweenmax/feed" rel="self" type="application/rss+xml" />
	<link>http://nwhy.org</link>
	<description>Life is short,Be yourself.</description>
	<lastBuildDate>Wed, 08 Sep 2010 05:34:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>AS3-TextFly effect using TweenMax 文字飞出效果</title>
		<link>http://nwhy.org/as3-textfly-effect-using-tweenmax.html</link>
		<comments>http://nwhy.org/as3-textfly-effect-using-tweenmax.html#comments</comments>
		<pubDate>Fri, 06 Mar 2009 08:00:00 +0000</pubDate>
		<dc:creator>DFdou</dc:creator>
				<category><![CDATA[AIR+FB+AS3]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[TweenLite]]></category>
		<category><![CDATA[TweenMax]]></category>

		<guid isPermaLink="false">http://nwhy.org/?p=3854</guid>
		<description><![CDATA[Demo: The core codes is so easy here using TweenMax: [js] import gs.TweenMax; //存放字符串 var str:String = "TextField 类用于创建显示对象以显示和输入文本。 SWF 文件中的所有动态文本字段和输ActionScript 提供了多种... ]]></description>
			<content:encoded><![CDATA[<p>Demo:<br />
<object id="TextFly" height="400" width="600" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"><param name="allowScriptAccess" value="sameDomain"/><param name="movie" value="http://nwhy.org/nwhy/exp/textFly.swf"/><param name="quality" value="high"/><embed height="400" width="600" src="http://nwhy.org/nwhy/exp/textFly.swf" quality="high" bgcolor="#ffffff" name="textFly" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"/><br />
</object><br />
The core codes is so easy here using TweenMax:<br />
[js]<br />
import gs.TweenMax;<br />
//存放字符串<br />
var str:String = "TextField 类用于创建显示对象以显示和输入文本。 SWF 文件中的所有动态文本字段和输ActionScript 提供了多种在运行时设置文本格式的方法。 TextFormat 类允许您设置 TextField 对象的字符和段落格式。 您可以使用 TextField.styleSheet 属性和 StyleSheet 类来对文本字段应用层叠样式表 (CSS) 样式。 您可以使用 CSS 设置内置 HTML 标签的样式、定义新的格式设置标签或应用样式。您可以将 HTML 格式的文本（该文本可以选择使用 CSS 样式）直接分配给文本字段。分配给文本字段的 HTML 文本可以包含嵌入的媒体（影片剪辑、SWF 文件、GIF 文件、PNG 文件和 JPEG 文件）。文本在嵌入的媒体旁自动换行，这与 Web 浏览器的文本在 HTML 文档中嵌入的媒体旁换行非常类似。Flash Player 还支持部分 HTML 标签，可以使用这些 HTML 标签设置文本格式。 要查看受支持 HTML 标签的列表，请参阅对 htmlText 属性的描述。";<br />
//临时存放字符串<br />
var tmpstr:String;<br />
//字符串长度<br />
var countTotal:uint=str.length;<br />
//格式设置<br />
var tft:TextFormat = new TextFormat();<br />
tft.font = "Verdana";<br />
tft.color = 0x666666;<br />
init();<br />
function init(){<br />
	//赋值<br />
	tmpstr = str;<br />
	//每100ms出发一次，共触发countTotal次<br />
    var t:Timer=new Timer(100,countTotal);<br />
    t.addEventListener ("timer", textFly);<br />
    t.addEventListener("timerComplete",reFly);<br />
    t.start ();<br />
}<br />
function textFly (_evt:TimerEvent) {<br />
    //trace (_evt.target.currentCount);<br />
	//建立一个tf<br />
    var e_str:TextField=new TextField();<br />
	//给个随机大小<br />
    tft.size =Math.random()*48+12;<br />
    e_str.defaultTextFormat = tft;<br />
	//tf的text用当前轮到的字符<br />
    e_str.text=tmpstr.charAt(0);<br />
    e_str.selectable=false;<br />
    tmpstr =tmpstr.substr(1);<br />
    txtInfo.text=tmpstr;<br />
    addChild (e_str);<br />
	//飞吧，孩子<br />
    TweenMax.to(e_str, 2, {x:-100, y:300, bezier:[{x:500, y:0},{x:500, y:300}],onComplete:clearText,onCompleteParams:[e_str]});<br />
};<br />
function reFly(_evt:TimerEvent){<br />
    var btnReFly:TextField=new TextField();<br />
    btnReFly.text="btnReFly";<br />
    btnReFly.x=450;<br />
    btnReFly.y=300;<br />
    btnReFly.selectable=false;<br />
    btnReFly.addEventListener(MouseEvent.CLICK,btnReFlyClk);<br />
    addChild(btnReFly);<br />
}<br />
function btnReFlyClk(_evt:MouseEvent){<br />
    clearText (_evt.target)<br />
    init();<br />
}<br />
function clearText (_mc) {<br />
    removeChild (_mc);<br />
}<br />
[/js]</p>
<h4  class="related_post_title">Some Related Posts</h4><ul class="related_post"><li>2009/11/26 -- <a  href="http://nwhy.org/as3-caurina-tween.html" title="AS3-Caurina 动画类">AS3-Caurina 动画类</a> (1)</li><li>2008/10/29 -- <a  href="http://nwhy.org/flash-tweenlitemax.html" title="TweenLiteMax介绍">TweenLiteMax介绍</a> (0)</li><li>2008/10/20 -- <a  href="http://nwhy.org/tweenlite-class.html" title="AS3-TweenLite类">AS3-TweenLite类</a> (5)</li><li>2010/03/18 -- <a  href="http://nwhy.org/as3-mapconvert.html" title="AS3-Mapppp~的一个生成方案">AS3-Mapppp~的一个生成方案</a> (3)</li><li>2010/02/04 -- <a  href="http://nwhy.org/as3-aspaceescape-map-tile.html" title="AS3-aSpaceEscape 迷宫脱离游戏(二)地图生成部分">AS3-aSpaceEscape 迷宫脱离游戏(二)地图生成部分</a> (0)</li><li>2010/02/03 -- <a  href="http://nwhy.org/as3-aspaceescape.html" title="AS3-aSpaceEscape 迷宫脱离游戏(一)分析">AS3-aSpaceEscape 迷宫脱离游戏(一)分析</a> (0)</li><li>2009/11/24 -- <a  href="http://nwhy.org/as3-sharedobject-flash-cookie.html" title="AS3-SharedObject Flash的Cookie">AS3-SharedObject Flash的Cookie</a> (0)</li><li>2009/11/23 -- <a  href="http://nwhy.org/as3-captcha.html" title="AS3-Captcha验证码类">AS3-Captcha验证码类</a> (7)</li><li>2009/11/20 -- <a  href="http://nwhy.org/as3-bitmap-explode-effect.html" title="AS3-Effect explode 图片爆炸效果">AS3-Effect explode 图片爆炸效果</a> (2)</li><li>2009/11/12 -- <a  href="http://nwhy.org/as3-camera-avataredit.html" title="AS3-视频拍照功能">AS3-视频拍照功能</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://nwhy.org/as3-textfly-effect-using-tweenmax.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>TweenLiteMax介绍</title>
		<link>http://nwhy.org/flash-tweenlitemax.html</link>
		<comments>http://nwhy.org/flash-tweenlitemax.html#comments</comments>
		<pubDate>Wed, 29 Oct 2008 07:11:40 +0000</pubDate>
		<dc:creator>DFdou</dc:creator>
				<category><![CDATA[Flash AS2]]></category>
		<category><![CDATA[TweenFilterLite]]></category>
		<category><![CDATA[TweenLite]]></category>
		<category><![CDATA[TweenLiteMax]]></category>
		<category><![CDATA[TweenMax]]></category>

		<guid isPermaLink="false">http://www.street13.org/?p=1749</guid>
		<description><![CDATA[丢个官方链接，AS2版本的，http://blog.greensock.com/tweenmaxas2/ 下边是一些效果，恩，个人比较惊喜的是又贝赛尔曲线的Tween版本，很好，很强大～ 下边这个是颜色渐变的， 下边这个是简单功能的Twee... ]]></description>
			<content:encoded><![CDATA[<p>丢个官方链接，AS2版本的，<a  href="http://blog.greensock.com/tweenmaxas2/">http://blog.greensock.com/tweenmaxas2/</a><br />
下边是一些效果，恩，个人比较惊喜的是又贝赛尔曲线的Tween版本，很好，很强大～<br />
<embed id="fm_TweenMax_Beziers_1539354105" height="562" width="550" quality="high" bgcolor="#000000" name="fm_TweenMax_Beziers_1539354105" src="http://www.greensock.com/ActionScript/TweenMax/TweenMax_Beziers.swf" type="application/x-shockwave-flash"/><br />
下边这个是颜色渐变的，<br />
<embed id="fm_TweenMax_Filters_1594095401" height="504" width="550" quality="high" bgcolor="#666666" name="fm_TweenMax_Filters_1594095401" src="http://www.greensock.com/ActionScript/TweenMax/TweenMax_Filters.swf" type="application/x-shockwave-flash"/><br />
下边这个是简单功能的Tween，<br />
<embed id="fm_TweenMax_Basics_811544572" height="492" width="550" quality="high" bgcolor="#000000" name="fm_TweenMax_Basics_811544572" src="http://www.greensock.com/ActionScript/TweenMax/TweenMax_Basics.swf" type="application/x-shockwave-flash"/><br />
官方还有TweenLite，TweenFilterLite，TweenMax3个的比较，有兴趣的可以去看下那个表格……很长……</p>
<h4  class="related_post_title">Some Related Posts</h4><ul class="related_post"><li>2009/03/06 -- <a  href="http://nwhy.org/as3-textfly-effect-using-tweenmax.html" title="AS3-TextFly effect using TweenMax 文字飞出效果">AS3-TextFly effect using TweenMax 文字飞出效果</a> (3)</li><li>2009/11/26 -- <a  href="http://nwhy.org/as3-caurina-tween.html" title="AS3-Caurina 动画类">AS3-Caurina 动画类</a> (1)</li><li>2008/10/20 -- <a  href="http://nwhy.org/tweenlite-class.html" title="AS3-TweenLite类">AS3-TweenLite类</a> (5)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://nwhy.org/flash-tweenlitemax.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
