[mx04] Can I do this w/actionscript only?

I have a menu I’m trying to make, and it’s in the shape of a windmill. I’ve got the rotation set up like I want and that’s working fine, but because it’s suppost to look as if it’s at an agle, it doesn’t look right while it is rotating. here is the swf
http://img41.imageshack.us/my.php?image=windmill1md0.swf&tc=img41/9800/p42000921zg.jpg
I have it set up like this:
I have it as a moveclip called wind1, on the stage with the instance name full_wind.
Inside the wind1 movieclip are the 4 fanblade movie clips called blade_1, blade_2, blade_3 and blade_4.
There is also text in the blade_1 movie clip, and ther will be on each of the blades eventually.
frame 1 of the main movie has the rotation actionscript on it.

So what I’d like to do is this,
as the blades rotate, I’d like them to shrink or stretch as the reach a certain position in there rotation cycle so as to add a bit of perspective to it. when the blades reach the top right and bottom left position they need to shrink a bit, and when they reach the top left and bottom right they need to stretch back, but smoothly.
I’m not sure if I should be using hittest or _scale here.
I’d like to do this with actionscript if possible, I don’t like the result of frame by frame animation for this.
I’m learning actionscript, so alot this doesnt make sense to me.

[QUOTE=skellykitten;1984575]I have a menu I’m trying to make, and it’s in the shape of a windmill. I’ve got the rotation set up like I want and that’s working fine, but because it’s suppost to look as if it’s at an agle, it doesn’t look right while it is rotating. here is the swf
http://img41.imageshack.us/my.php?image=windmill1md0.swf&tc=img41/9800/p42000921zg.jpg
I have it set up like this:
I have it as a moveclip called wind1, on the stage with the instance name full_wind.
Inside the wind1 movieclip are the 4 fanblade movie clips called blade_1, blade_2, blade_3 and blade_4.
There is also text in the blade_1 movie clip, and ther will be on each of the blades eventually.
frame 1 of the main movie has the rotation actionscript on it.

So what I’d like to do is this,
as the blades rotate, I’d like them to shrink or stretch as the reach a certain position in there rotation cycle so as to add a bit of perspective to it. when the blades reach the top right and bottom left position they need to shrink a bit, and when they reach the top left and bottom right they need to stretch back, but smoothly.
I’m not sure if I should be using hittest or _scale here.
I’d like to do this with actionscript if possible, I don’t like the result of frame by frame animation for this.
I’m learning actionscript, so alot this doesnt make sense to me.[/QUOTE]

maybe something like this would work

wind1.onEnterFrame = function() {
	this._rotation += 2;
	this.blade_1._xscale = this.blade_1._yscale=100+40*Math.sin(Math.PI*this._rotation/180);
	this.blade_2._xscale = this.blade_2._yscale=100+40*Math.sin(Math.PI*(this._rotation+90)/180);
	this.blade_3._xscale = this.blade_3._yscale=100+40*Math.sin(Math.PI*(this._rotation+180)/180);
	this.blade_4._xscale = this.blade_4._yscale=100+40*Math.sin(Math.PI*(this._rotation+270)/180);
};

if you really want them to scale up twice in one _rotatation multiply each angle by 2
eg

100+40*Math.sin(2*Math.PI*this._rotation/180)

Alter the value of 40 to the amount you want it to scale above/below 100

[ot] holy crap its stringy - where ya been man? :hugegrin: [/ot]

[ot]Nice to see you are still around Lun :slight_smile: , I only came on because i wanted to reach 4000 before rha -failing miserably[/ot]

[ot]:lol: yeah, you got a little catching up to do! [/ot]

Thanks, I’ll try this:)

it didn’t work. Thanks though:)