Pages: [1] 2
  Print  
Author Topic: MOD: Cache and preload Gaia pages  (Read 3247 times)
TyZ
Gaia User
**
Posts: 59


Temple - http://templelibrary.googlecode.com/

tyz
WWW
« on: January 25, 2010, 07:09:11 AM »

Since there is no (easy) way for this in Gaia, I created a way to easily cache and preload gaia pages, with minor Gaia changes:

http://www.tyz.nl/2010/01/25/cache-and-preload-gaia-pages/


Please let me know what you think of it.

Logged
TyZ
Gaia User
**
Posts: 59


Temple - http://templelibrary.googlecode.com/

tyz
WWW
« Reply #1 on: January 26, 2010, 12:28:46 AM »

Just updated the classes. Progress and error events are now dispatched correctly.
Logged
solconnection
Gaia User
**
Posts: 13


« Reply #2 on: March 16, 2010, 11:11:10 AM »

i havent tried this yet but just wanted to say thankyou anyway, ive been looking for something just like this Smiley

have a nice day
-Dan
Logged
TyZ
Gaia User
**
Posts: 59


Temple - http://templelibrary.googlecode.com/

tyz
WWW
« Reply #3 on: May 25, 2010, 02:32:24 AM »

All classes are improved and now available in our "Temple" library at Google code: http://code.google.com/p/templelibrary/source/browse/trunk#trunk/lib/temple/data/loader/cache
Logged
pixelkreativ
Gaia Novice
*
Posts: 5


« Reply #4 on: September 14, 2010, 06:29:10 AM »

Nice library... works good! Could you tell me if there is any way to preload the pages in the background while the user is browsing on the current page?
Logged
TyZ
Gaia User
**
Posts: 59


Temple - http://templelibrary.googlecode.com/

tyz
WWW
« Reply #5 on: September 14, 2010, 06:36:17 AM »

You could set preload to false in the asset node and load the asset manually. Just like you would normally do with an asset.
Logged
pixelkreativ
Gaia Novice
*
Posts: 5


« Reply #6 on: September 14, 2010, 07:45:41 AM »

You could set preload to false in the asset node and load the asset manually. Just like you would normally do with an asset.

Oh, cool... thanks for your fast reply!
Logged
redconservatory
Gaia Novice
*
Posts: 3


« Reply #7 on: November 11, 2010, 02:46:49 PM »

I just tried this out with the latest version of Gaia (3.2.3) and it appears to load all of my pages at once (great!). However, it looks like the preloader has disappeared (I am using the default preloader).

Any suggestions?
Logged
TyZ
Gaia User
**
Posts: 59


Temple - http://templelibrary.googlecode.com/

tyz
WWW
« Reply #8 on: November 12, 2010, 12:47:55 AM »

Nope, everything works fine here.
Logged
redconservatory
Gaia Novice
*
Posts: 3


« Reply #9 on: November 15, 2010, 12:19:56 PM »

Wait, I see now. You cannot see the preloader when testing in the Flash IDE (using the "simulate download") setting...but the preloader shows up online.
Logged
alex_m
Gaia Novice
*
Posts: 4


« Reply #10 on: January 18, 2011, 08:56:19 AM »

Thanks for your great work, but I can’t get it working with the latest versions of the Gaia(3.2.3) and the Temple(2.8.2) - it keeps loading new pages into memory.
Please let me know if I did something wrong. Here is my source (used your last example from your comment in blog):
http://www.mediafire.com/?q2w0pkqeoki8phm
Logged
TyZ
Gaia User
**
Posts: 59


Temple - http://templelibrary.googlecode.com/

tyz
WWW
« Reply #11 on: January 19, 2011, 02:02:12 AM »

@alex: I already answered you on my blog: http://www.tyz.nl/2010/01/25/cache-and-preload-gaia-pages/#comment-10935
Logged
Peter_D
Gaia User
**
Posts: 15


« Reply #12 on: March 22, 2011, 11:32:41 AM »

Hi, I've decided to use this mod, but unfortunately it doesn't work Wink

I've use two version with .as files an with .swc file...without success

In first case, on start of course pages where preloading, but during change pege. Preloader was just showing up. Not good.

In my second case, I've 3 errors. on CS3

1046: Type was not found or was not a compile-time constant: CacheLoader.  -- public var _loader:CacheLoader;
1180: Call to a possibly undefined method CacheLoader. -- _loader = new CacheLoader();
1172: Definition temple.data.loader.cache:CacheLoader could not be found. -- import temple.data.loader.cache.CacheLoader;

And these errors on CS5
VerifyError: Error #1014: Nie znaleziono klasy temple.data.loader.cache::CacheLoader.

   at com.gaiaframework.assets::AssetTypes$/http://www.gaiaflashframework.com/2008/flash/com/gaia/api/gaia_internal::init()
   at com.gaiaframework.core::GaiaMain/startGaia()
   at com.gaiaframework.core::GaiaMain/onAddedToStage()
   at Main/onAddedToStage()


Of course I copy .swc file to folder that contain Main.as and to others folders with .as files.

Does anybody has got working example?

Thanks
Logged
TyZ
Gaia User
**
Posts: 59


Temple - http://templelibrary.googlecode.com/

tyz
WWW
« Reply #13 on: March 24, 2011, 08:49:31 AM »

@Peter_D: copying the .swc to the source folder isn't enough. You must add the .swc file to the library path of your .fla file. Did you try the example of my blog?
Logged
egifford
Gaia Novice
*
Posts: 2


« Reply #14 on: December 01, 2011, 04:08:36 AM »

Thanks for this! But wait ..... checking this out for the first time, I am STUNNED by the level of tight integration with your framework!  I started adding classes  ... got to about 10, and began to wonder, how deep does this rabbit hole go? How many classes I need to import from Temple framework to use this Gaia extension?

10?
20?

No no ... I counted JUST the individual classes needed to use CacheURLLoader
61!

61 individual Class dependencies to use this (don't believe me, count for yourself)
This also adds 63KB to main.swf

Guys, can you help me understand?
« Last Edit: December 01, 2011, 04:10:17 AM by egifford » Logged
Pages: [1] 2
  Print  
 
Jump to:  

TinyPortal v1.0 beta 4 © Bloc