Wheels SPin?

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?

Post your file so we can take a look.

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?

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.

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

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

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

No problem. :stuck_out_tongue:

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

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

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

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

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

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.

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

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

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

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.

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.