Author |
Message |
Geno
Site Admin
Joined: Tue Jan 27, 2009 11:32 am Posts: 11709 Country:
Gender: Anime Girl
Currently Playing: Undertale
|
how do you speed up a movie clip, without effecting the whole thing?
-_-
badly worded... uhm... how do you speed up a movie clip, whithout... changing the fps of the WHOLE project?
|
Mon Jul 27, 2009 5:44 pm |
|
|
Gold
Joined: Sat Aug 23, 2008 3:10 am Posts: 2601 Location: Australia - Sydney
Gender: Male
Currently Playing: Ninja Gaiden III
|
You could remove some frames. Changing the fps of a certain section however, I don't know how to do that...
|
Sat Aug 01, 2009 11:09 pm |
|
|
Evilagram
Joined: Wed Apr 29, 2009 11:28 pm Posts: 323 Location: Nowhere, Antarctica
Gender: Anime Girl
Skype: Evilagram
|
You can only change the FPS of a movieclip in AS 3. It's impossible in AS 2.
_________________Style [Stayl] (n) - One's unique and personal method of defacing a perfectly good piece of paper. READ THIS: http://ipgd.freehostia.com/copypasta.html
|
Sun Aug 02, 2009 4:28 am |
|
|
Geno
Site Admin
Joined: Tue Jan 27, 2009 11:32 am Posts: 11709 Country:
Gender: Anime Girl
Currently Playing: Undertale
|
|
Sun Aug 02, 2009 1:57 pm |
|
|
Rod F
Joined: Tue Jul 28, 2009 5:08 pm Posts: 4 Location: Montevideo, Uruguay
Gender: Male
|
You could just remove some frames from the tweening, just like the DVDV28 said. There's no need to change fps... however, if you are considering DYNAMIC change of speed from the MovieClip you COULD make a function that could skip some frames to make it look like it goes faster (or make it go in slow motion, making each frame stay stopped for a fraction of second..).
|
Mon Aug 03, 2009 8:03 pm |
|
|
Geno
Site Admin
Joined: Tue Jan 27, 2009 11:32 am Posts: 11709 Country:
Gender: Anime Girl
Currently Playing: Undertale
|
hmm... although helpful, the second idea is unnessesary work. i'll do the first idea. thanks. and i saw your sprite game. Insane. Great job.
|
Mon Aug 03, 2009 8:06 pm |
|
|
Rod F
Joined: Tue Jul 28, 2009 5:08 pm Posts: 4 Location: Montevideo, Uruguay
Gender: Male
|
Thanks for the compliment.
I know it's a lot of work. But sometimes you may want to have a -bulletime effect- on a game and a function like the one I mentioned comes useful... in fact, something along those lines is what is used in my game for the slow motion KO. That's why i used all-caps to differentiate between a normal timeline effect to make something run faster/slower or make something change it's animation speed 'dynamically'.
|
Tue Aug 04, 2009 9:40 pm |
|
|
Geno
Site Admin
Joined: Tue Jan 27, 2009 11:32 am Posts: 11709 Country:
Gender: Anime Girl
Currently Playing: Undertale
|
oh, ok then. See, I was wondering because im going to be making a sprite movie, and i will have to be slowing/ speeding up sprites.
|
Tue Aug 04, 2009 9:42 pm |
|
|
Rod F
Joined: Tue Jul 28, 2009 5:08 pm Posts: 4 Location: Montevideo, Uruguay
Gender: Male
|
Oh!!! So if it's just a movie then don't mind my function ideas.... you can just work your way around by fiddling with the timeline's keyframes...
|
Tue Aug 04, 2009 9:49 pm |
|
|
Geno
Site Admin
Joined: Tue Jan 27, 2009 11:32 am Posts: 11709 Country:
Gender: Anime Girl
Currently Playing: Undertale
|
|
Tue Aug 04, 2009 9:50 pm |
|
|
Evilagram
Joined: Wed Apr 29, 2009 11:28 pm Posts: 323 Location: Nowhere, Antarctica
Gender: Anime Girl
Skype: Evilagram
|
The latter function would look really cruddy though, unless you were actionscripting all the tweens. And at that point there's no point in making such a function in the first place. The former function is certainly possible. I can't say recommended, because dropping frames can lead to trouble in terms of conveying actions and motions. It's also troublesome in that you need to guarantee that the frames that you aren't skipping actually get rendered. If they don't, then you stand to crash flash. A novice coder would probably make something like this: If you actually tried running this code, what would happen is that flash would crash unless you took precautions to set fastForward to another value. Although it's possible that it might not crash and will catch on the last 1-2 frames due to the target frame no longer existing. The reason this happens is because when flash renders a frame, the first thing to happen is that the actionscript is executed. If you stick gotoAndPlay on a frame, contrary to what you might expect, that frame will never be shown to the viewer. If you make a movie with two frames, each having a gotoAndPlay telling it to go to the other frame, flash would crash due to it being an infinite loop. Same if you improperly code a for loop. While loops are prone to this behavior all the time. I've never put a while loop to any good effect except during one actionscript experiment regarding a not-quite-3d vase, and even then the effect in question could have been done much more efficiently with a simple if. Anyway, the thing about this code is that you need to guarantee that the frame renders, that the code isn't active every single frame. While it may appear that what would happen is that it would set frameRender to false, then to true again, in reality it would never execute the code after the gotoAndPlay. And now that I have given you this code, all you need to do is make sure it runs every frame, and that all the necessary variables exist, and are pointed at the correct location.
_________________Style [Stayl] (n) - One's unique and personal method of defacing a perfectly good piece of paper. READ THIS: http://ipgd.freehostia.com/copypasta.html
|
Wed Aug 05, 2009 7:31 am |
|
|
Rod F
Joined: Tue Jul 28, 2009 5:08 pm Posts: 4 Location: Montevideo, Uruguay
Gender: Male
|
Since you're probably using the function inside an onEnterFrame event in the main timeline then i think it's best solved if instead of using gotoAndPlay you use gotoAndStop... that way, no extra frame is rendered and since every onEnterFrame you'll be skipping X amount of frames, the animation will look the same as in your suggestion (because, as the event suggests, it will always do it on entering a new frame, which means that the moment your frame is going to be displayed it's already skipping the X amount of frames because of the code, making the gotoAndPlay redundant. With a function like this you'll be as if animating 'dynamically' (sort of manually) instead of timeline and fps dependent.
Nevertheless, it's still an interesting suggestion. I for one haven't tried messing around with a 'fast foward'function.
|
Wed Aug 05, 2009 10:10 am |
|
|
Geno
Site Admin
Joined: Tue Jan 27, 2009 11:32 am Posts: 11709 Country:
Gender: Anime Girl
Currently Playing: Undertale
|
thanks to both of you. I am using a main timeline. You know, putting the menu at frame one, and when you press play the code is
on (release)(gotoandplay)(2)
im doing the simple stuff now, and i laugh as i try to understand you experts. i look up to you two, and i hope to be experts like you someday.
|
Wed Aug 05, 2009 1:01 pm |
|
|