<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: TweenLite Introduction</title>
	<link>http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/</link>
	<description>A digital supplement for the O'Reilly book</description>
	<pubDate>Fri, 30 Jul 2010 13:46:35 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: subbu</title>
		<link>http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/#comment-7276</link>
		<dc:creator>subbu</dc:creator>
		<pubDate>Mon, 21 Jun 2010 10:51:50 +0000</pubDate>
		<guid>http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/#comment-7276</guid>
		<description>Awesome. I just started learning Flash/ActionScript3.0 the hard way. This was a real nice article on tweening. Looking forward for more of these.

subbu</description>
		<content:encoded><![CDATA[<p>Awesome. I just started learning Flash/ActionScript3.0 the hard way. This was a real nice article on tweening. Looking forward for more of these.</p>
<p>subbu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich</title>
		<link>http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/#comment-5954</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Wed, 24 Feb 2010 15:56:10 +0000</pubDate>
		<guid>http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/#comment-5954</guid>
		<description>@priya, I'm afraid you've got a bit of a mess on your hands there. THe first code is an excerpt from an AS3 class, and the second excerpt is from an AS2 procedural script. You'll have to update your second snippet to AS3 and then choose whether you want a class or a function.

As a start, I can guess at an AS3 version of the second snippet, although this is definitely untested:

&lt;pre class="code"&gt;
addEventListener(Event.ENTER_FRAME, onFrameEnter, false, 0, true);
function onFrameEnter(evt:Event):void {
	var xMouse:Number = mouseX;
	var yMouse:Number = mouseY;
	if (Math.abs(xMouse - ball_mc.x) &lt; 1) {
		ball_mc.x = xMouse;
		ball_mc.y = yMouse;
	} else {
		ball_mc.x -= (ball_mc.x-xMouse) / 6;
		ball_mc.y -= (ball_mc.y-yMouse) / 6;
	}
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>@priya, I&#8217;m afraid you&#8217;ve got a bit of a mess on your hands there. THe first code is an excerpt from an AS3 class, and the second excerpt is from an AS2 procedural script. You&#8217;ll have to update your second snippet to AS3 and then choose whether you want a class or a function.</p>
<p>As a start, I can guess at an AS3 version of the second snippet, although this is definitely untested:</p>
<pre class="code">
addEventListener(Event.ENTER_FRAME, onFrameEnter, false, 0, true);
function onFrameEnter(evt:Event):void {
	var xMouse:Number = mouseX;
	var yMouse:Number = mouseY;
	if (Math.abs(xMouse - ball_mc.x) < 1) {
		ball_mc.x = xMouse;
		ball_mc.y = yMouse;
	} else {
		ball_mc.x -= (ball_mc.x-xMouse) / 6;
		ball_mc.y -= (ball_mc.y-yMouse) / 6;
	}
}
</pre>
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: priya</title>
		<link>http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/#comment-5655</link>
		<dc:creator>priya</dc:creator>
		<pubDate>Fri, 29 Jan 2010 10:14:59 +0000</pubDate>
		<guid>http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/#comment-5655</guid>
		<description>i need to mix 2 codes together but coming up with errors, i have to made tween object follow cursor and my code is

&lt;pre class="code"&gt;
// this creates tween
public function startTween():void
		{
TweenLite.to( this, 2, { delay:1, x:getX(this), y:getY(this), ease:Elastic.easeOut, onComplete:startTween} );
				}else{
TweenLite.to( this, 2, { delay:1, x:x, y:y, ease:Elastic.easeOut, onComplete:startTween} );
				}
			//}
		}
&lt;/pre&gt;

this code makes object follow curser, how can i join it in above code so it comes without errors

&lt;pre class="code"&gt;
ball_mc.onEnterFrame = function() {
	var xMouse = _root._xmouse;
	var yMouse = _root._ymouse;
	if(Math.abs(xMouse - this._x) &#60; 1) {
		this._x = xMouse;
		this._y = yMouse;
	} else {
		this._x -= (this._x-xMouse) / 6;
		this._y -= (this._y-yMouse) / 6;
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>i need to mix 2 codes together but coming up with errors, i have to made tween object follow cursor and my code is</p>
<pre class="code">
// this creates tween
public function startTween():void
		{
TweenLite.to( this, 2, { delay:1, x:getX(this), y:getY(this), ease:Elastic.easeOut, onComplete:startTween} );
				}else{
TweenLite.to( this, 2, { delay:1, x:x, y:y, ease:Elastic.easeOut, onComplete:startTween} );
				}
			//}
		}
</pre>
<p>this code makes object follow curser, how can i join it in above code so it comes without errors</p>
<pre class="code">
ball_mc.onEnterFrame = function() {
	var xMouse = _root._xmouse;
	var yMouse = _root._ymouse;
	if(Math.abs(xMouse - this._x) &lt; 1) {
		this._x = xMouse;
		this._y = yMouse;
	} else {
		this._x -= (this._x-xMouse) / 6;
		this._y -= (this._y-yMouse) / 6;
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gayle Van Wely</title>
		<link>http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/#comment-4595</link>
		<dc:creator>Gayle Van Wely</dc:creator>
		<pubDate>Fri, 06 Nov 2009 21:48:15 +0000</pubDate>
		<guid>http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/#comment-4595</guid>
		<description>Awesome. I'm sure it will be great.

Thank you!
Gayle</description>
		<content:encoded><![CDATA[<p>Awesome. I&#8217;m sure it will be great.</p>
<p>Thank you!<br />
Gayle</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich</title>
		<link>http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/#comment-4477</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Wed, 28 Oct 2009 23:05:03 +0000</pubDate>
		<guid>http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/#comment-4477</guid>
		<description>@Gayle, yes. I think both Zevan and I will write about the new version. I know I am planning a thing or two about it and, if I've correctly gauged Zevan's appreciation for the classes, he will probably follow up this great post with something new at some point.</description>
		<content:encoded><![CDATA[<p>@Gayle, yes. I think both Zevan and I will write about the new version. I know I am planning a thing or two about it and, if I&#8217;ve correctly gauged Zevan&#8217;s appreciation for the classes, he will probably follow up this great post with something new at some point.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich</title>
		<link>http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/#comment-4476</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Wed, 28 Oct 2009 23:02:24 +0000</pubDate>
		<guid>http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/#comment-4476</guid>
		<description>@Yarden, you're welcome!</description>
		<content:encoded><![CDATA[<p>@Yarden, you&#8217;re welcome!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich</title>
		<link>http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/#comment-4475</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Wed, 28 Oct 2009 23:01:54 +0000</pubDate>
		<guid>http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/#comment-4475</guid>
		<description>@Steve, Flash isn't optimized for playing the timeline backwards, so your performance may vary. Here's one way to do it. (This is a simplified example that doesn't use any buttons.)

&lt;pre class="code"&gt;
//frame 1
var movement:String = "forward";

this.addEventListener(Event.ENTER_FRAME, onEnter, false, 0, true);
function onEnter(evt:Event):void {
	if (movement == "forward") {
		play();
	} else if (movement == "backward") {
		gotoAndStop(currentFrame-1);
	}
}

//frame 10
stop();
movement = "backward";
&lt;/pre&gt;

The file starts out in "forward" mode and just plays the timeline. When it reaches frame 10, the &lt;span class="inlineas"&gt;movement&lt;/span&gt; variable is set to "backward" and the file just goes to one frame at a time, the currentFrame - 1, unitil the variable is reset to again. In otherwords, every frame, you're telling the playhead to go to the frame before it.

In your case, you can change the variable value with buttons or the frames in which you have stop actions.</description>
		<content:encoded><![CDATA[<p>@Steve, Flash isn&#8217;t optimized for playing the timeline backwards, so your performance may vary. Here&#8217;s one way to do it. (This is a simplified example that doesn&#8217;t use any buttons.)</p>
<pre class="code">
//frame 1
var movement:String = "forward";

this.addEventListener(Event.ENTER_FRAME, onEnter, false, 0, true);
function onEnter(evt:Event):void {
	if (movement == "forward") {
		play();
	} else if (movement == "backward") {
		gotoAndStop(currentFrame-1);
	}
}

//frame 10
stop();
movement = "backward";
</pre>
<p>The file starts out in &#8220;forward&#8221; mode and just plays the timeline. When it reaches frame 10, the <span class="inlineas">movement</span> variable is set to &#8220;backward&#8221; and the file just goes to one frame at a time, the currentFrame - 1, unitil the variable is reset to again. In otherwords, every frame, you&#8217;re telling the playhead to go to the frame before it.</p>
<p>In your case, you can change the variable value with buttons or the frames in which you have stop actions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gayle Van Wely</title>
		<link>http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/#comment-4473</link>
		<dc:creator>Gayle Van Wely</dc:creator>
		<pubDate>Wed, 28 Oct 2009 21:04:51 +0000</pubDate>
		<guid>http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/#comment-4473</guid>
		<description>Will you be putting up some examples of the updated version v11. 

Looking forward to seeing some.

Best,
Gayle</description>
		<content:encoded><![CDATA[<p>Will you be putting up some examples of the updated version v11. </p>
<p>Looking forward to seeing some.</p>
<p>Best,<br />
Gayle</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yarden Refaeli</title>
		<link>http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/#comment-4154</link>
		<dc:creator>Yarden Refaeli</dc:creator>
		<pubDate>Thu, 08 Oct 2009 23:55:45 +0000</pubDate>
		<guid>http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/#comment-4154</guid>
		<description>Thank you for this helpful guide! your blog design is AMAZING too =]
Added to my iGoogle reader...

-Yarden</description>
		<content:encoded><![CDATA[<p>Thank you for this helpful guide! your blog design is AMAZING too =]<br />
Added to my iGoogle reader&#8230;</p>
<p>-Yarden</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/#comment-3945</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Mon, 21 Sep 2009 00:59:13 +0000</pubDate>
		<guid>http://www.learningactionscript3.com/2008/06/06/tweenlite-introduction/#comment-3945</guid>
		<description>Hello,

I am a student from AIO and working on my portfolio. I have been learning a lot just from your postings.  I have a question about using tweenlite for a reverse frame animation.

I have an animation with 50 frames at every 10 frames I have a stop action. 
I have two button forward and backward, the forward button plays the timeline till the next stop action.  Then you press the forward button and again plays till the next stop action.

I need the backward button to play the timeline in reverse order till it hits a stop()action

Could you give any suggestion.

THANKS YOU FOR ANY HELP!</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>I am a student from AIO and working on my portfolio. I have been learning a lot just from your postings.  I have a question about using tweenlite for a reverse frame animation.</p>
<p>I have an animation with 50 frames at every 10 frames I have a stop action.<br />
I have two button forward and backward, the forward button plays the timeline till the next stop action.  Then you press the forward button and again plays till the next stop action.</p>
<p>I need the backward button to play the timeline in reverse order till it hits a stop()action</p>
<p>Could you give any suggestion.</p>
<p>THANKS YOU FOR ANY HELP!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
