Pages: [1]
  Print  
Author Topic: How to make load action start after preload transitionInComplete() calls?  (Read 206 times)
cjboy1984
Gaia Novice
*
Posts: 2


« on: October 23, 2011, 05:22:04 AM »

Hi all,
I wrote a preloader inherited from AbstractPreloader.
And I trace some infomation
override public function onProgress(e:AssetEvent):void
{
   trace(e.asset);
   trace(int(100 * e.perc));
}
 then I found the result is:
[PageAsset] root
Preloader.onProgress(0)
e.loaded = -1
e.total = 2
[PageAsset] root
Preloader.onProgress(50)
e.loaded = -1
e.total = 2
Preloader.transitionIn()
[PageAsset] root
Preloader.onProgress(50)
e.loaded = 0
e.total = 2
[PageAsset] home
Preloader.onProgress(50)
e.loaded = 0
e.total = 2
[PageAsset] home
Preloader.onProgress(100)
e.loaded = 0
e.total = 2
home_main.onAdd(e)
Preloader.transitionOut()
Preloader.transitionInComplete()
Preloader.transitionOutComplete()


I want the preload has a transition-in action.
The loader of the core should be started after the transition-in finished.
So how could I make it~~~
Logged
viaria
Gaia Fan
***
Posts: 112


viaria
WWW
« Reply #1 on: October 25, 2011, 08:45:54 PM »

hard to understand your problem.
Logged
cjboy1984
Gaia Novice
*
Posts: 2


« Reply #2 on: October 25, 2011, 09:08:18 PM »

Sorry~~~my bad English
I just want the GAIA core to wait the customized preloader finished its transition-in and out.
But I got the solution~~~by using the following code

preloader.releaseGaia = Gaia.api.beforePreload(preloader.transitIn, true);
Logged
viaria
Gaia Fan
***
Posts: 112


viaria
WWW
« Reply #3 on: October 26, 2011, 12:47:00 AM »

really nice that you wrote the solution here.
Logged
Pages: [1]
  Print  
 
Jump to:  

TinyPortal v1.0 beta 4 © Bloc