-
I want this code made in cs2 to cs3
Hello
this code works fine in cs2, over an symbol movieclip, in ac2 I type:
Code:
onClipEvent(enterFrame){
this._rotation++;
}
and the symbol rotates well.
I'll try in as3, I type next code, compile fine, but it doesn't rotate
Code:
// this code doesn't do anything
addEventListener(Event.ENTER_FRAME, myHour);
function myHour(e:Event):void {
this._rotation++;
}
-
_rotation needs to be rotation (no underscore).
Where are you putting that code? If it's in the main timeline, then it is attempting to rotate the whole swf, which of course will not work. If that's the case, the easiest way is probably to simply specify the item you're trying to rotate in the function.
Code:
someClip.addEventListener(Event.ENTER_FRAME, myHour);
function myHour(e:Event):void{
someClip.rotation++;
}
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
|