<?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: Realistic Car Movement</title>
	<link>http://www.awestyproductions.com/tutorials/flash-tutorials/realistic-car-movement/</link>
	<description></description>
	<pubDate>Fri, 10 Feb 2012 19:03:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: Spammaster</title>
		<link>http://www.awestyproductions.com/tutorials/flash-tutorials/realistic-car-movement/#comment-25580</link>
		<dc:creator>Spammaster</dc:creator>
		<pubDate>Fri, 16 Jan 2009 13:16:16 +0000</pubDate>
		<guid>http://www.awestyproductions.com/tutorials/flash-tutorials/realistic-car-movement/#comment-25580</guid>
		<description>Thank you very much for the tutorial.
HOWEVER
The movement code doesn't have friction.
Could you tell me how to add rotating wheels, to this code?:

stop();
horizontalspeed = 0;
verticalspeed = 0;
friction = 0.92;
speed = 0.9;
car.onEnterFrame = function() {
	if (Key.isDown(Key.LEFT)) {
		horizontalspeed -= speed;
	}
	if (Key.isDown(Key.RIGHT)) {
		horizontalspeed += speed;
	}
	car._y += verticalspeed;
	car._x += horizontalspeed;
	horizontalspeed *= friction;
	verticalspeed *= friction;
	if (car._x&#62;=550-car._width/2) {
		car._x = 549-car._width/2;
		horizontalspeed = 0;
	}
	if (car._x=400-car._height/2) {
		car._y = 399-car._height/2;
		verticalspeed = 0;
	}
	if (car._y&#60;=0+car._height/2) {
		car._y = 1+car._height/2;
		verticalspeed = 0;
	}
};</description>
		<content:encoded><![CDATA[<p>Thank you very much for the tutorial.<br />
HOWEVER<br />
The movement code doesn&#8217;t have friction.<br />
Could you tell me how to add rotating wheels, to this code?:</p>
<p>stop();<br />
horizontalspeed = 0;<br />
verticalspeed = 0;<br />
friction = 0.92;<br />
speed = 0.9;<br />
car.onEnterFrame = function() {<br />
	if (Key.isDown(Key.LEFT)) {<br />
		horizontalspeed -= speed;<br />
	}<br />
	if (Key.isDown(Key.RIGHT)) {<br />
		horizontalspeed += speed;<br />
	}<br />
	car._y += verticalspeed;<br />
	car._x += horizontalspeed;<br />
	horizontalspeed *= friction;<br />
	verticalspeed *= friction;<br />
	if (car._x&gt;=550-car._width/2) {<br />
		car._x = 549-car._width/2;<br />
		horizontalspeed = 0;<br />
	}<br />
	if (car._x=400-car._height/2) {<br />
		car._y = 399-car._height/2;<br />
		verticalspeed = 0;<br />
	}<br />
	if (car._y&lt;=0+car._height/2) {<br />
		car._y = 1+car._height/2;<br />
		verticalspeed = 0;<br />
	}<br />
};</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: simon</title>
		<link>http://www.awestyproductions.com/tutorials/flash-tutorials/realistic-car-movement/#comment-6492</link>
		<dc:creator>simon</dc:creator>
		<pubDate>Fri, 10 Aug 2007 09:32:37 +0000</pubDate>
		<guid>http://www.awestyproductions.com/tutorials/flash-tutorials/realistic-car-movement/#comment-6492</guid>
		<description>how do i make it go faster??</description>
		<content:encoded><![CDATA[<p>how do i make it go faster??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: awesty</title>
		<link>http://www.awestyproductions.com/tutorials/flash-tutorials/realistic-car-movement/#comment-5843</link>
		<dc:creator>awesty</dc:creator>
		<pubDate>Mon, 02 Jul 2007 08:29:25 +0000</pubDate>
		<guid>http://www.awestyproductions.com/tutorials/flash-tutorials/realistic-car-movement/#comment-5843</guid>
		<description>I dont really understand what you are trying to say.</description>
		<content:encoded><![CDATA[<p>I dont really understand what you are trying to say.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trunk Monkey</title>
		<link>http://www.awestyproductions.com/tutorials/flash-tutorials/realistic-car-movement/#comment-5433</link>
		<dc:creator>Trunk Monkey</dc:creator>
		<pubDate>Mon, 04 Jun 2007 08:40:21 +0000</pubDate>
		<guid>http://www.awestyproductions.com/tutorials/flash-tutorials/realistic-car-movement/#comment-5433</guid>
		<description>I want the car to come in from the side but not the person controlling it. I used this code to move in the side (which I got off the gravity tut but it changed abit of it)
onClipEvent (load) { 
acc = 9.8;
time = 0; 
fps = 20;
} 
onClipEvent (enterFrame) { 
time = time+1/fps; 
this._x -= Math.pow(time, 2)*acc; 
_root.restart.onPress = function() { 
_root.aircraft._x = -50; 
time = 0;
};
}

but when I do it the wheels
don't move</description>
		<content:encoded><![CDATA[<p>I want the car to come in from the side but not the person controlling it. I used this code to move in the side (which I got off the gravity tut but it changed abit of it)<br />
onClipEvent (load) {<br />
acc = 9.8;<br />
time = 0;<br />
fps = 20;<br />
}<br />
onClipEvent (enterFrame) {<br />
time = time+1/fps;<br />
this._x -= Math.pow(time, 2)*acc;<br />
_root.restart.onPress = function() {<br />
_root.aircraft._x = -50;<br />
time = 0;<br />
};<br />
}</p>
<p>but when I do it the wheels<br />
don&#8217;t move</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timmy</title>
		<link>http://www.awestyproductions.com/tutorials/flash-tutorials/realistic-car-movement/#comment-5108</link>
		<dc:creator>Timmy</dc:creator>
		<pubDate>Mon, 14 May 2007 23:28:53 +0000</pubDate>
		<guid>http://www.awestyproductions.com/tutorials/flash-tutorials/realistic-car-movement/#comment-5108</guid>
		<description>oh and what does the registration do?(the little boxs that u could click on when you are converting to symbol)???</description>
		<content:encoded><![CDATA[<p>oh and what does the registration do?(the little boxs that u could click on when you are converting to symbol)???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timmy</title>
		<link>http://www.awestyproductions.com/tutorials/flash-tutorials/realistic-car-movement/#comment-5107</link>
		<dc:creator>Timmy</dc:creator>
		<pubDate>Mon, 14 May 2007 23:25:41 +0000</pubDate>
		<guid>http://www.awestyproductions.com/tutorials/flash-tutorials/realistic-car-movement/#comment-5107</guid>
		<description>how could i make it go up and down not just right and left?
i don't care about the wheels</description>
		<content:encoded><![CDATA[<p>how could i make it go up and down not just right and left?<br />
i don&#8217;t care about the wheels</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eblup</title>
		<link>http://www.awestyproductions.com/tutorials/flash-tutorials/realistic-car-movement/#comment-4944</link>
		<dc:creator>eblup</dc:creator>
		<pubDate>Fri, 04 May 2007 03:35:29 +0000</pubDate>
		<guid>http://www.awestyproductions.com/tutorials/flash-tutorials/realistic-car-movement/#comment-4944</guid>
		<description>hey put in ground and make it ride the line. plz</description>
		<content:encoded><![CDATA[<p>hey put in ground and make it ride the line. plz</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: awesty</title>
		<link>http://www.awestyproductions.com/tutorials/flash-tutorials/realistic-car-movement/#comment-4894</link>
		<dc:creator>awesty</dc:creator>
		<pubDate>Tue, 01 May 2007 10:36:49 +0000</pubDate>
		<guid>http://www.awestyproductions.com/tutorials/flash-tutorials/realistic-car-movement/#comment-4894</guid>
		<description>Well the easiest way would be to do something like:

if(this._x &gt; (stage.width+this._width)){
this._x = (0-this._width);
}

That would only be for the right side of the stage though. There are other and better ways of doing it but that is the easiest IMO.</description>
		<content:encoded><![CDATA[<p>Well the easiest way would be to do something like:</p>
<p>if(this._x > (stage.width+this._width)){<br />
this._x = (0-this._width);<br />
}</p>
<p>That would only be for the right side of the stage though. There are other and better ways of doing it but that is the easiest IMO.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: awesty</title>
		<link>http://www.awestyproductions.com/tutorials/flash-tutorials/realistic-car-movement/#comment-4892</link>
		<dc:creator>awesty</dc:creator>
		<pubDate>Tue, 01 May 2007 10:34:35 +0000</pubDate>
		<guid>http://www.awestyproductions.com/tutorials/flash-tutorials/realistic-car-movement/#comment-4892</guid>
		<description>:D</description>
		<content:encoded><![CDATA[<p> <img src='http://www.awestyproductions.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kurt</title>
		<link>http://www.awestyproductions.com/tutorials/flash-tutorials/realistic-car-movement/#comment-4832</link>
		<dc:creator>Kurt</dc:creator>
		<pubDate>Sat, 28 Apr 2007 13:30:31 +0000</pubDate>
		<guid>http://www.awestyproductions.com/tutorials/flash-tutorials/realistic-car-movement/#comment-4832</guid>
		<description>holly smokes! the last time i was on this website it was alot different!

Lol i gotten back into runescape and now I'm getting back into flash</description>
		<content:encoded><![CDATA[<p>holly smokes! the last time i was on this website it was alot different!</p>
<p>Lol i gotten back into runescape and now I&#8217;m getting back into flash</p>
]]></content:encoded>
	</item>
</channel>
</rss>








<!-- analytics977 --> 
