<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-10410998</id><updated>2011-10-30T06:52:38.651-07:00</updated><title type='text'>flash7 easing and bounce</title><subtitle type='html'>Learn how to build a ball with "easing" and  "bounce" in FlashMX 2004 using Actionscript2</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://flash7bounce.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10410998/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://flash7bounce.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>flashbug</name><uri>http://www.blogger.com/profile/14385518131285424185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-10410998.post-110673928109444077</id><published>2005-01-20T03:34:00.000-08:00</published><updated>2005-01-27T09:50:03.263-08:00</updated><title type='text'>easing and bounce</title><content type='html'>&lt;a href="http://www.dustyinfo.com/flash7/easingclass01.swf"&gt;&lt;br /&gt;&lt;embed src="http://www.dustyinfo.com/flash7/easingclass01.swf" quality="high" bgcolor="#666666" width="400" height="300" name="easingclass01" align="middle" /&gt;&lt;/embed&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10410998-110673928109444077?l=flash7bounce.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10410998/posts/default/110673928109444077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10410998/posts/default/110673928109444077'/><link rel='alternate' type='text/html' href='http://flash7bounce.blogspot.com/2005/01/easing-and-bounce.html' title='easing and bounce'/><author><name>flashbug</name><uri>http://www.blogger.com/profile/14385518131285424185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-10410998.post-110674330951634650</id><published>2005-01-18T04:40:00.000-08:00</published><updated>2005-01-27T09:46:56.386-08:00</updated><title type='text'>build a ball with easing and bounce </title><content type='html'>&lt;img src="http://www.dustyinfo.com/flash7/Screen17294.gif" /&gt;&lt;br /&gt;&lt;img src="http://www.dustyinfo.com/flash7/Screen17295.gif" /&gt;&lt;br /&gt;&lt;img src="http://www.dustyinfo.com/flash7/Screen17296.gif" /&gt;&lt;br /&gt;&lt;img src="http://www.dustyinfo.com/flash7/Screen17297.gif" /&gt;&lt;br /&gt;&lt;img src="http://www.dustyinfo.com/flash7/Screen17298.gif" /&gt;&lt;br /&gt;&lt;img src="http://www.dustyinfo.com/flash7/Screen17299.gif" /&gt;&lt;br /&gt;&lt;img src="http://www.dustyinfo.com/flash7/Screen17300.gif" /&gt;&lt;br /&gt;&lt;img src="http://www.dustyinfo.com/flash7/Screen17313.gif" /&gt;&lt;br /&gt;&lt;img src="http://www.dustyinfo.com/flash7/Screen17314.gif" /&gt;&lt;br /&gt;&lt;img src="http://www.dustyinfo.com/flash7/Screen17315.gif" /&gt;&lt;br /&gt;&lt;img src="http://www.dustyinfo.com/flash7/Screen17307.gif" /&gt;&lt;br /&gt;&lt;img src="http://www.dustyinfo.com/flash7/Screen17308.gif" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Finally, you are ready to add some Actionscript2&lt;/b&gt; to bring this thing to life.  Simply select Frame 1 of the "ball_e" layer, press F-9 to open the Actions Panel, then copy and paste the following Actionscript2.  &lt;i&gt;(You will be prevented from pasting anything if you don't see a blue stripe on the left side of the Actions Panel -- but clicking directly somewhere inside the Panel will produce the blue stripe, indicating the Panel is active)&lt;/i&gt;. &lt;br /&gt;&lt;br /&gt;&lt;font color="#666666"&gt;&amp;lt;!-- ---------- start .as code ---------- --&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="#cccc33"&gt;// ACTIONSCRIPT FOR ebutton_btn  &lt;br /&gt;// [ easing.Strong.easeOut ]&lt;br /&gt;ebutton_btn.onRelease = function() {&lt;br /&gt;        tweenBall();&lt;br /&gt;};&lt;br /&gt;function tweenBall() {&lt;br /&gt;        easeType = mx.transitions.easing.Strong.easeOut;&lt;br /&gt;        var begin = 45;&lt;br /&gt;        var end = 270;&lt;br /&gt;        var time = 3.5;&lt;br /&gt;        var mc = greyball_mc;&lt;br /&gt;        ballTween = new mx.transitions.Tween(mc, "_y", easeType, begin, end, time, true); // PUT ALL OF THAT ON ONE LINE&lt;br /&gt;}&lt;/font&gt;&lt;br /&gt;&lt;font color="#666666"&gt;&amp;lt;!-- ---------- end .as code ---------- --&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;A small "a" should have appeared in Frame 1 of the "ball_e" layer.&lt;br /&gt;&lt;br /&gt;Repeat the preceeding steps to the "ball_d" layer using the following Actionscript2:&lt;br /&gt;&lt;br /&gt;&lt;font color="#666666"&gt;&amp;lt;!-- ---------- start .as code ---------- --&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="#cccc33"&gt;// ACTIONSCRIPT FOR dbutton_btn&lt;br /&gt;// [ easing.Bounce.easeOut ]&lt;br /&gt;dbutton_btn.onRelease = function() {&lt;br /&gt;        tweenBall();&lt;br /&gt;};&lt;br /&gt;function tweenBall() {&lt;br /&gt;        easeType = mx.transitions.easing.Bounce.easeOut;&lt;br /&gt;        var begin = 45;&lt;br /&gt;        var end = 270;&lt;br /&gt;        var time = 3.5;&lt;br /&gt;        var mc = oliveball_mc;&lt;br /&gt;        ballTween = new mx.transitions.Tween(mc, "_y", easeType, begin, end, time, true); // PUT ALL OF THAT ON ONE LINE&lt;br /&gt;}&lt;/font&gt;&lt;br /&gt;&lt;font color="#666666"&gt;&amp;lt;!-- ---------- end .as code ---------- --&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;Do the same to the "ball_c" layer using the following Actionscript2:&lt;br /&gt;&lt;br /&gt;&lt;font color="#666666"&gt;&amp;lt;!-- ---------- start .as code ---------- --&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="#cccc33"&gt;// ACTIONSCRIPT FOR cbutton_btn&lt;br /&gt;// [ easing.Back.easeOut ]&lt;br /&gt;cbutton_btn.onRelease = function() {&lt;br /&gt;        tweenBall();&lt;br /&gt;};&lt;br /&gt;function tweenBall() {&lt;br /&gt;        easeType = mx.transitions.easing.Back.easeOut;&lt;br /&gt;        var begin = 45;&lt;br /&gt;        var end = 270;&lt;br /&gt;        var time = 3.5;&lt;br /&gt;        var mc = greenball_mc;&lt;br /&gt;        ballTween = new mx.transitions.Tween(mc, "_y", easeType, begin, end, time, true); // PUT ALL OF THAT ON ONE LINE&lt;br /&gt;}&lt;/font&gt;&lt;br /&gt;&lt;font color="#666666"&gt;&amp;lt;!-- ---------- end .as code ---------- --&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;Do the same to the "ball_b" layer using the following Actionscript2:&lt;br /&gt;&lt;br /&gt;&lt;font color="#666666"&gt;&amp;lt;!-- ---------- start .as code ---------- --&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="#cccc33"&gt;// ACTIONSCRIPT FOR bbutton_btn&lt;br /&gt;// [ easing.Regular.easeOut ]&lt;br /&gt;bbutton_btn.onRelease = function() {&lt;br /&gt;        tweenBall();&lt;br /&gt;};&lt;br /&gt;function tweenBall() {&lt;br /&gt;        easeType = mx.transitions.easing.Regular.easeOut;&lt;br /&gt;        var begin = 45;&lt;br /&gt;        var end = 270;&lt;br /&gt;        var time = 3.5;&lt;br /&gt;        var mc = orangeball_mc;&lt;br /&gt;        ballTween = new mx.transitions.Tween(mc, "_y", easeType, begin, end, time, true); // PUT ALL OF THAT ON ONE LINE&lt;br /&gt;} &lt;/font&gt;&lt;br /&gt;&lt;font color="#666666"&gt;&amp;lt;!-- ---------- end .as code ---------- --&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;Do the same to the "ball_a" layer using the following Actionscript2:&lt;br /&gt;&lt;b&gt;NOTE:  This Actionscript2 has additional code to give it a continuous "yo-yo" movement.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="#666666"&gt;&amp;lt;!-- ---------- start .as code ---------- --&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="#cccc33"&gt;// ACTIONSCRIPT FOR abutton_btn&lt;br /&gt;[ easing.Regular.easeIn + YOYO function ]&lt;br /&gt;&lt;br /&gt;abutton_btn.onRelease = function() {&lt;br /&gt;        tweenBall();&lt;br /&gt;};&lt;br /&gt;function tweenBall() {&lt;br /&gt;        easeType = mx.transitions.easing.Regular.easeIn;&lt;br /&gt;        var begin = 45;&lt;br /&gt;        var end = 270;&lt;br /&gt;        var time = 3.5;&lt;br /&gt;        var mc = blueball_mc;&lt;br /&gt;        ballTween = new mx.transitions.Tween(mc, "_y", easeType, begin, end, time, true); // PUT ALL OF THAT ON ONE LINE&lt;br /&gt;		ballTween.onMotionFinished = function() {&lt;br /&gt;			this.yoyo();&lt;br /&gt;		};  &lt;br /&gt;} &lt;/font&gt;&lt;br /&gt;&lt;font color="#666666"&gt;&amp;lt;!-- ---------- end .as code ---------- --&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.dustyinfo.com/flash7/Screen17311.gif" /&gt;&lt;br /&gt;&lt;img src="http://www.dustyinfo.com/flash7/Screen17312.gif" /&gt;&lt;br /&gt;&lt;br /&gt;Well, congratulations!&lt;br /&gt;You should now have five balls, all bouncing and/or easing...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10410998-110674330951634650?l=flash7bounce.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flash7bounce.blogspot.com/feeds/110674330951634650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10410998&amp;postID=110674330951634650' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10410998/posts/default/110674330951634650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10410998/posts/default/110674330951634650'/><link rel='alternate' type='text/html' href='http://flash7bounce.blogspot.com/2005/01/build-ball-with-easing-and-bounce.html' title='build a ball with easing and bounce '/><author><name>flashbug</name><uri>http://www.blogger.com/profile/14385518131285424185</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
