Pages: [1]
  Print  
Author Topic: Moving Page Swfs to CDN  (Read 190 times)
ctmrich
Gaia Novice
*
Posts: 2


« on: July 22, 2011, 01:56:10 PM »

Hello,

I'm trying to move my page section swfs to a cdn server so it will load quicker. I changed the page node src to the cdn links, but I am getting this error:

TypeError: Error #1034: Type Coercion failed: cannot convert pages::AboutPage@40951381 to com.gaiaframework.api.IPage.
   at com.gaiaframework.assets::PageAsset/decorate()
   at com.gaiaframework.assets::PageAsset/onComplete()

I see that it is downloading the file from the cdn, once the preloader finishes it just won't transition in. Any ideas would help greatly. Thanks!

-Rich
Logged
steven
Gaia Author
Administrator
Gaia Evangelist
*****
Posts: 3871


gaiaframework
WWW
« Reply #1 on: July 22, 2011, 04:40:31 PM »

It's an application domain issue (since they're loading from a different domain). You have to use domain="current" in the site node.
Logged

Steven Sacks | Gaia Author
Please support Gaia by donating to the project!  Smiley
ctmrich
Gaia Novice
*
Posts: 2


« Reply #2 on: July 22, 2011, 06:04:09 PM »

Ok. so changed my site node to :


<site title="GAIA: %PAGE%" menu="true" domain="current">

but still encountering the same issue. do all swfs need to be put on the cdn for it to work? i kept the main.swf, index.swf, preloader.swf in the website root not the external cdn link?

Do I need to also add security allow code?
i.e.,
          Security.allowDomain("*");
          Security.allowInsecureDomain("*");
          Security.loadPolicyFile("http://CDNWEBSITENAME.com/crossdomain.xml");

?
Logged
Ramiro
Moderator
Gaia Addict
*****
Posts: 861


interactive pragmatism


« Reply #3 on: July 22, 2011, 06:15:57 PM »

the policy file is loaded automatically. You might Security.allowDomain in the swf files since Gaia calls methods on them, and they're loaded from a different domain. Put it in AbstractPage and recompile everything
Logged
Pages: [1]
  Print  
 
Jump to:  

TinyPortal v1.0 beta 4 © Bloc