-
Simple rotation... Why doesnt this work propperly??
Hi guys.
I'm having a problem getting the _rotation property to work for me. Im using MX 2004. it doesnt make any sense to me as to why it isnt working, but here's the code:
code:
onClipEvent(enterFrame){
trace(_rotation);
_rotation += change++;
}
Am I just having a serious brain fart today? or is there nothing wrong with this code?
-
Are you making the game for PSX2C? Well hurry it up!
-
haha, Who is this??
-
muhahaha you'll never know j/k it's THX. I go to this site whenever I need flash help and saw your post and finally decided to register just to freak you out.
I wish I could help but I belong in the newbies section.
-
thats cool man... Yeah, Ill work on a game for PSX2 when I have the time. Right now I've got so much on my plate that its kind of a low priority.
Glad to see you in here man. I wish PSX2C was busy AND as helpfull as this forum man. I kind of feel like PSX2C is my 'forum-native land".
-
BTW, my output keeps poping out 0.
-
Senior Member
You might be having a problem if change is not initialized to a valid number. Try this:
Code:
onClipEvent(load)
{
this.change = 0;
}
onClipEvent(enterFrame){
trace(this._rotation);
this._rotation += this.change++;
}
I assume, from this code, that your intent is to get the rotation to accelerate over time.
-
Thanks man, thats exactly what I needed and yes, the object accelerates over time.
Thanks again
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|