-
1. Re: Preload to Memory ( is that even possible ) ?
Donny1985 Apr 3, 2012 11:11 PM (in response to Applauz78)I've found I sometimes experience less stutter if I have everything on the display list and control through visible rather than add/remove children.
Also you can try hiding through off screen x or y properties.
-
2. Re: Preload to Memory ( is that even possible ) ?
Applauz78 Apr 4, 2012 5:34 AM (in response to Donny1985)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.
-
3. Re: Preload to Memory ( is that even possible ) ?
Colin Holgate Apr 4, 2012 6:18 AM (in response to Applauz78)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.
-
4. Re: Preload to Memory ( is that even possible ) ?
Mark.Raykhenberg Apr 4, 2012 9:49 AM (in response to Applauz78)The simple solution is to have a loading screen and simply place all your concent on the stage hiddent behind the loading screen image, then proceed to the level or animation you are loading, this way you get that first time on stage part out of the way in the background.
-
5. Re: Preload to Memory ( is that even possible ) ?
Applauz78 Apr 4, 2012 9:51 AM (in response to Mark.Raykhenberg)So Im trying that .. and it seems to work with MovieClips that are only 1 level. However if its a movieclip that contains another movieclip in it... its not caching the 2nd level movie clip.
-
6. Re: Preload to Memory ( is that even possible ) ?
Mark.Raykhenberg Apr 4, 2012 9:53 AM (in response to Applauz78)Put that second level movie clip to load on the stage as well.
-
7. Re: Preload to Memory ( is that even possible ) ?
Colin Holgate Apr 4, 2012 9:55 AM (in response to Applauz78)Of course that will be the case. You would need the sub movieclip to be in the stage area of the movieclip. You're only just getting a hint of why I like Direct more than GPU, if Direct ends up being good enough!
-
8. Re: Preload to Memory ( is that even possible ) ?
Applauz78 Apr 4, 2012 10:09 AM (in response to Colin Holgate)The second level movieclip is on the stage.
To test..
I left visible to true .. so I can verfiy everything is on the stage ... then I do the initial tweenMax from the off the stage back onto the stage. .. The first time this happens.. .it skips. Every time after that .. its fine,
-
9. Re: Preload to Memory ( is that even possible ) ?
Mark.Raykhenberg Apr 4, 2012 10:14 AM (in response to Applauz78)Love me some TweenMax, TweenLite. Anyhow you can then pretween your content before you show it to the user, do an accelerated tween so in like .1 seconds.
-
10. Re: Preload to Memory ( is that even possible ) ?
Colin Holgate Apr 4, 2012 10:31 AM (in response to Applauz78)I wasn't expecting that having the sub movieclip on the stage would help. If it's on the stage area of the movieclip it is in, then I would expect it to work.
-
11. Re: Preload to Memory ( is that even possible ) ?
Applauz78 Apr 4, 2012 10:44 AM (in response to Mark.Raykhenberg)Mark . can you elaborate on this ?
How do you pre tween with tweenMax ?
-
12. Re: Preload to Memory ( is that even possible ) ?
Mark.Raykhenberg Apr 4, 2012 10:47 AM (in response to Applauz78)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?
-
13. Re: Preload to Memory ( is that even possible ) ?
Applauz78 Apr 4, 2012 11:11 AM (in response to Mark.Raykhenberg)ahh ... tween it while hidden ... You had me excited for a minute.. thought maybe greensock had a method of pre caching the movieclip its going to tween to the GPU. Gonna try your method now. Will report the results.
-
14. Re: Preload to Memory ( is that even possible ) ?
Applauz78 Apr 4, 2012 11:28 AM (in response to Mark.Raykhenberg)Mark,
No go .. this didnt have any influence at all
-
15. Re: Preload to Memory ( is that even possible ) ?
Mark.Raykhenberg Apr 4, 2012 11:33 AM (in response to Applauz78)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.
-
16. Re: Preload to Memory ( is that even possible ) ?
Colin Holgate Apr 4, 2012 11:36 AM (in response to Mark.Raykhenberg)The visibility won't affect whether it's cached. Whether it's inside the stage area does. Having the same symbol cached at a different position in the hierarchy doesn't mean that other cases where the symbol is used is also cached.
-
17. Re: Preload to Memory ( is that even possible ) ?
Applauz78 Apr 4, 2012 11:37 AM (in response to Mark.Raykhenberg)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.
-
18. Re: Preload to Memory ( is that even possible ) ?
Mark.Raykhenberg Apr 4, 2012 11:42 AM (in response to Applauz78)What is the movie clip in question, is it just a still graphic or is it a timeline animation, or are you tweening children inside the parent mc from the stage?
-
19. Re: Preload to Memory ( is that even possible ) ?
Applauz78 Apr 4, 2012 11:44 AM (in response to Mark.Raykhenberg)Right now its just a movieclip and on the stage of that movieclip is 15 movieclip icons.
-
20. Re: Preload to Memory ( is that even possible ) ?
Mark.Raykhenberg Apr 4, 2012 11:49 AM (in response to Applauz78)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
-
21. Re: Preload to Memory ( is that even possible ) ?
Applauz78 Apr 4, 2012 11:56 AM (in response to Mark.Raykhenberg)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
-
22. Re: Preload to Memory ( is that even possible ) ?
Mark.Raykhenberg Apr 4, 2012 12:00 PM (in response to Applauz78)Try preloading those 15 mcs separately on the preload hidden screen, just for my own amusement.
Also try it without addChild but just plop those movie clips down on the timeline.
-
23. Re: Preload to Memory ( is that even possible ) ?
Colin Holgate Apr 4, 2012 12:00 PM (in response to Applauz78)How long after you addChild the MainMovie_MC do you tween it?
-
24. Re: Preload to Memory ( is that even possible ) ?
Applauz78 Apr 4, 2012 12:02 PM (in response to Colin Holgate)There is a big delay between adding child and when I do the tween. THe tween is invoked by a button press.. so I have lots of time to wait before I push the button to do the real tween.
I do the hidden tween immedately when the addChild is performed.
-
25. Re: Preload to Memory ( is that even possible ) ?
Applauz78 Apr 4, 2012 12:09 PM (in response to Mark.Raykhenberg)Gonna try putting the movieclips right on the timeline and controlling them from there with visible true / false now ... will report the results.
-
26. Re: Preload to Memory ( is that even possible ) ?
Applauz78 Apr 4, 2012 12:17 PM (in response to Mark.Raykhenberg)WOW! ... adding the movieclip directly to the timeline makes it a lot worse!
-
27. Re: Preload to Memory ( is that even possible ) ?
Mark.Raykhenberg Apr 4, 2012 12:30 PM (in response to Applauz78)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.
-
28. Re: Preload to Memory ( is that even possible ) ?
Applauz78 Apr 4, 2012 12:35 PM (in response to Mark.Raykhenberg)Im using a timer for the loading screen. Right now Im holding it for 4 seconds.
-
29. Re: Preload to Memory ( is that even possible ) ?
Applauz78 Apr 4, 2012 5:52 PM (in response to Applauz78)OMG!!! .. Just figured it out!... This is horrible. ONE of my text boxes was set to Readability instead of Animation. Works like a charm now! ... O M G!