|
-
talk to the hand!
[F8] How can I change framerate? for (slow motion)
I can`t find a way to change framerate during the game.
If I try to change all speeds the animation looks weird.
pls help me.
thnx in advance
-
Trainee coder
I believe it is possible in AS3 to change the framerate at runtime, though it'd be a whole lot trickier with AS2.
I'd take a look at time based animation (for an AS2 solution): Time based animation tutorial.
Unfortunately, you may need to re-write the entire engine to run under time triggered events. -depending on how flexible you've made it so far.
Viza.
-
talk to the hand!
the link has 2 swfs 5fps and 30fps
I`m trying to make a slow motion sceenario for a game
I`m not changing enterframe vars to make speeds slower cuz animations can`t slow down.
-
M.D.
you have to change the way your animations run. The way I would do it:
create 1 enterFrame
give every object control through this one enterFrame, call: myObject.control()
no animation should use gotoAndPlay()
on every start frame of every animation sequence add a stop()
on every objects control function write: currentAnimation.nextFrame()
when using gotoAndStop(newLabel) you must update currentAnimation to the object that exists there. And any animation that needs looping, you must put (in the mc) gotoAndStop(1) at the end of the animation
now to go slowMo:
_root.onEnterFrame = null;
interval = setInterval(_root, "control", 40);
to return:
clearInterval(interval)
_root.onEnterFrame = _root.control;
Last edited by mr_malee; 11-20-2007 at 03:44 AM.
-
talk to the hand!
 Originally Posted by mr_malee
you have to change the way your animations run. The way I would do it:
create 1 enterFrame
give every object control through this one enterFrame, call: myObject.control()
no animation should use gotoAndPlay()
on every start frame of every animation sequence add a stop()
on every objects control function write: currentAnimation.nextFrame()
when using gotoAndStop(newLabel) you must update currentAnimation to the object that exists there. And any animation that needs looping, you must put (in the mc) gotoAndStop(1) at the end of the animation
now to go slowMo:
_root.onEnterFrame = null;
interval = setInterval(_root, "control", 40);
to return:
clearInterval(interval)
_root.onEnterFrame = _root.control;
tnx Mr malee you saved the day
I earned the slow motion ability
one last thing
I have to learn AS3 and get flash cs3 to make the game faster
do you have any links to learn as3
I heard "as2 to as3" is like "playstation2 to playstation3" or something like that
-
Senior Member
 Originally Posted by Never_land:(
I heard "as2 to as3" is like "playstation2 to playstation3" or something like that
Hehe, more like nintendo to super nintendo. But it's definitely worth the effort. It's hardly a beginners tutorial, but the AS3 language reference is invaluable once you get started. The best way to get started to play around
with the new graphics API, Bitmaps, and Sprites.
http://www.adobe.com/go/as3lr
I think Adobe has published some "AS2 to AS3 Migration Tips" somewhere, but I couldn't come up with the URL. I read it - I didn't find it especially helpful. My view is AS2 is all about MovieClips, while AS3 is all about Sprites. I very rarely interact with MovieClip timelines anymore. I find AS3 much more similar to java than to any previous version of AS, it's more strongly typed and does a better job of standing on its own as a development platform than the previous version of AS, which still involved a lot of manipulation in the flash IDE.
-
Senior Member
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
|