hey, I am a newbe and am wondering how to rotate shape in action script, so that it may be continious.
have your shape in a movieclip and place this script on the timeline:
speed = 5
mymovieclip.onEnterFrame = function() {
this._rotation += speed
}
try different values for speed and see which fits best
I’m a newbe so where in the timeline?, and under the movie, or in the layer for the movie? I’ve tried a lot of things I think it could be, but they don’t work. Also, as long as I am asking questions, how do I get my site in the middle of the web page, like in dreamweaver where it is always in the center?
spin -
you’ll need to put that code on the root ( main ) timeline. then, be sure to give your movie clip an instance name in the proporties panel. then, change the “mymovieclip” in this code:
[AS]speed = 5
mymovieclip.onEnterFrame = function() {
this._rotation += speed
}
[/AS]
to reflect the new instance name. in case you don’t know where to put the instance name in, here is a screenshot:
for your next question, to center something in dreamweaver ( i’m using mx ), just select it and press ctrl+alt+shift+c and you should be done as a nun. pardon the pun.
k wtf that rhymed…
wow, it worked. thanks a lot.
glad i could help!
nice shortcut liam. (ie dreamweaver) I didn’t know about that one.
worked great, thx again