Be a Supporter!

Change Framerate On A Movieclip As3

  • 953 Views
  • 3 Replies
New Topic Respond to this Topic
stickman8190
stickman8190
  • Member since: Mar. 7, 2012
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Change Framerate On A Movieclip As3 2012-07-08 11:29:21 Reply

I would like to know how to change the frameRate on a MovieClip in ActionScript 3

So any idea?


also click Here to view my profile at jiggmin.com

BBS Signature
mark212
mark212
  • Member since: Oct. 9, 2011
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to Change Framerate On A Movieclip As3 2012-07-08 12:52:50 Reply

the only way i can think of is to have a function like this

public var frameRate:Number = 12;

private function changeFrame()
{
    gotoAndStop(currentFrame+1);
    setTimeout(changeFrame, 1000/frameRate);
}
stickman8190
stickman8190
  • Member since: Mar. 7, 2012
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Response to Change Framerate On A Movieclip As3 2012-07-08 13:08:42 Reply

At 7/8/12 12:52 PM, mark212 wrote: the only way i can think of is to have a function like this

public var frameRate:Number = 12;

private function changeFrame()
{
gotoAndStop(currentFrame+1);
setTimeout(changeFrame, 1000/frameRate);
}

Am I suppose to type this code inside a MovieClip?


also click Here to view my profile at jiggmin.com

BBS Signature
mark212
mark212
  • Member since: Oct. 9, 2011
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to Change Framerate On A Movieclip As3 2012-07-08 13:23:42 Reply

the code was incomplete, just a way to guide a programmer to a solution. if your not into programming then why do you want to dynamically change the framerate using as3?