# Wheels SPin?

**URL:** <https://forum.kirupa.com/t/wheels-spin/26777>\
**Category:** flash\
**Created:** [July 26, 2003, 7:03am UTC](https://forum.kirupa.com/t/wheels-spin/26777 "2003-07-26T07:03:44Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Madburner](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@Madburner](https://forum.kirupa.com/u/Madburner)\
**Post date:** [July 26, 2003, 7:03am UTC](https://forum.kirupa.com/t/wheels-spin/26777/1 "2003-07-26T07:03:44Z")

</div>

I just made a car in Flashmx, actually in illustrator and then I imported it as an swf frame in flash. NOw im trying to make it seem like the wheels are moving. The LEft and right wheel are on a seperate layer. I was able to make the wheels seem like they were spinning on a motion tween from a rotation. But that was only when it stood still. Now im trying to make the whole entire car seem like its moving. I tried to change the postion of the wheel at each keyframe. It was good until i saw that the wheel stop spinning. How come? I even tried to make the wheel into a movie symbol and making it spin in the movie and have the wheels move out side of the movie clip (wheels).

Does anybody know how to resolve this?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 26, 2003, 7:05am UTC](https://forum.kirupa.com/t/wheels-spin/26777/2 "2003-07-26T07:05:46Z")

</div>

Post your file so we can take a look.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 26, 2003, 7:37am UTC](https://forum.kirupa.com/t/wheels-spin/26777/3 "2003-07-26T07:37:05Z")

</div>

IM just trying to make the car tires spin and move along with the car. thats all.

Do you know how to move an object and make it rotate while its moving?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 26, 2003, 7:44am UTC](https://forum.kirupa.com/t/wheels-spin/26777/4 "2003-07-26T07:44:54Z")

</div>

What I would do is put the wheels in a movieclip of their own and have those loop so they spin continuesly.

Next I’ll place the car along with those 2 wheel movieclips inside a movieclip of their own.

So now on stage I’ll have 1 movieclip that contains the car and 2 wheel movieclips.

Finally to make the car move, I’ll tween the entire movieclip and it will have the wheels move with the car and spinning at the same time.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 26, 2003, 7:52am UTC](https://forum.kirupa.com/t/wheels-spin/26777/5 "2003-07-26T07:52:40Z")

</div>

I believe i tried something like that. It didn’t work propely. Do u think you can post an a sample? or do u know where i can find an .fla that has objects that move and rotate at the same time

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 26, 2003, 7:54am UTC](https://forum.kirupa.com/t/wheels-spin/26777/6 "2003-07-26T07:54:35Z")

</div>

Here you go, I made a simple example. Please excuse how lame and retarded my car looks. I spent about 20 seconds on it. 😛

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 26, 2003, 8:06am UTC](https://forum.kirupa.com/t/wheels-spin/26777/7 "2003-07-26T08:06:20Z")

</div>

HEY THANK YOU! I’ll show you how it looks after im done, Thanks alot 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 26, 2003, 8:06am UTC](https://forum.kirupa.com/t/wheels-spin/26777/8 "2003-07-26T08:06:50Z")

</div>

No problem. 😛

Sure, post what you have when you’re done, I would love to see it. =)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 26, 2003, 8:42am UTC](https://forum.kirupa.com/t/wheels-spin/26777/9 "2003-07-26T08:42:58Z")

</div>

umm… how do u post an attachment of an swf?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 26, 2003, 8:49am UTC](https://forum.kirupa.com/t/wheels-spin/26777/10 "2003-07-26T08:49:17Z")

</div>

Click on “post reply” and look towards the bottom, you’ll see a drop down menu for file uploading.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 26, 2003, 8:58am UTC](https://forum.kirupa.com/t/wheels-spin/26777/11 "2003-07-26T08:58:11Z")

</div>

i keep getting this error message  
i keep getting this error, how come?

The uploaded file is not a valid GIF or JPG file. Please ensure that it is and try again.

The name of the file is Car Strolling.swf

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 26, 2003, 8:59am UTC](https://forum.kirupa.com/t/wheels-spin/26777/12 "2003-07-26T08:59:10Z")

</div>

nice car there EG!!! You could make a quick tutorial on this because I’m sure this gets asked a lot.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 26, 2003, 8:59am UTC](https://forum.kirupa.com/t/wheels-spin/26777/13 "2003-07-26T08:59:51Z")

</div>

Oh no…we we’re having problems with the forum. Try zipping up your swf file then uploading your zip file instead. I’ll make a note of this so we can fix the problem.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 26, 2003, 9:04am UTC](https://forum.kirupa.com/t/wheels-spin/26777/14 "2003-07-26T09:04:48Z")

</div>

Another thing that is happening with the wheel as it turns is that, I see it kind of staggers after a few frames. Its not entirely noticable but i can see it stutter every 10frames

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 26, 2003, 9:13am UTC](https://forum.kirupa.com/t/wheels-spin/26777/15 "2003-07-26T09:13:44Z")

</div>

that is just when the loop ends. EG did that extremely quick.

I noticed that also EG but didn’t think anything of it…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 26, 2003, 9:38am UTC](https://forum.kirupa.com/t/wheels-spin/26777/16 "2003-07-26T09:38:12Z")

</div>

I think the stagger Madburner is referring to is caused by the interactions of too many objects moviing at once. It gets a bit more processor intesive when you’re tweening multiple objects at once.

I tried experimenting by using a bit more actionscript instead of tweens and found that it was worse which is wierd. I guess my scripting isn’t efficient enough. I got rid of all the tweens and applied this script to the car.

```auto
onClipEvent (load) {
	_x = 0;
}
onClipEvent (enterFrame) {
	_root.carMC.wheel1._rotation += 25;
	_root.carMC.wheel2._rotation += 25;
	if (this._x<=440) {
		this._x += 7;
	} else if (this._x>=440) {
		this._x = 0;
	}
}

```

Here’s the fla if you want to look at it.
