So I noticed with the app I am working on. There are some stutters the first time a section animates on the stage. Once its been seen on the stage is performs great for the duration of the session.
is there a way to preload all these movieclips to memory or something so that they will always perform great from the first time they are displayed to the stage ?
I always thought best practice is to removeChild and null movieclips when they arent needed for the moment. ?
WIth your method of visible and x y positioning. ... do you just do an addChild on everything when your app first starts and then position all elements to visible / false and/or off stage ?
then just toggle and set up as you need ?
I have a feeling the same issue will happen where it will stutter the first time it is used. It's almost like the display has to actually see it one time through before it will remember it and play it smooth the next time.
It sounds like you're using GPU. When you do, the bitmap doesn't get transferred to the GPU until the first time it is within the stage area. If you smoothly animate it from outside of the stage, it will stutter as it goes into the stage area. You can solve that by placing it in the stage area for at least one frame's worth of time before you move it. It can be invisible at the time, it will still be cached. Then on the frame where you start to animate it, set it to be visible.
Oh I sounded over complicated on my post, I am still in that whole hide your content you want to load in the background mode, then tween it it while its hidden once, just an accelerated version of it, then when you tween it for the user it will be pre tweened.
This is kind of a hacky way of doing it, but if it works and solves your issue then who cares, right?
So it still stutters when you tween it the second time? Seems strange since you said after you tween it once the second time around it runs smooth, so the hidden tween would be the tweening it once and the visible tween would be the smooth tween.Did you tween it the first time while its set to visible = false? If so do it with it being visible, although hidden, you know what I mean.
no no ..
So whats happening is that it stutters on the first real visible tween.
I even tried using loadChild when the app first loads.. but set an index of 0 to hide it.
then when you click the button to view that movieclip .. I moved the index up to bring the clip to the front and do the tween .. That still stutters.
I tried putting the tween while the movieclip is at 0 .. even tried using the exact tween statement of the actual tween I perform while visible. ... It still stutters.
Once the stutter happens once.. it never happens again until you close the app completely. and re open.
And then you are tweening those 15 movie clips from the main stage?
And from previous post it sounds like you have tried putting those 15 mcs in the preloading hidden screen? correct?
From my experience flash seems to have a bit of a delay playing sounds or movie clips or anything the first time it encounters it however playing it once before seems to solve this problem, not sure why any of my pro tips are not helping ![]()
Lets call my main movieclip MainMovie_mc
inside of MainMovie_mc is 15 movieclips they are all on the stage already.
On the hidden preload I am only doing the addChild from the library for MainMovie_mc .. as it contains all the other smaller movieClip icons.
When Im doing the hidden tween I am only doing that tween on MainMovie_mc
Now I am totally confused. You tried taking out the 15mcs from the parent and putting them on the timeline? I was suggesting just duplicating them on the timeline as their own entities and still keeping them in the parent mc, I am guessing you put them all in one mc for a reason. Also how does your loading screen work? Are you pausing on it for a second or two or do you just let the movie play through that frame? You might need to stop there for a few seconds to allow flash to load up all the assets.
North America
Europe, Middle East and Africa
Asia Pacific