Return to Starling Playback Library

loading GAF zip in secure environments

Questions related to Starling playback library should be asked here.

loading GAF zip in secure environments

Postby Dev Xpinator » April 11th, 2015, 10:49 pm

Hello
we see in our logs a lot of loading errors referring the GAF zip files
we suspect that it happens in secure environments that blocks type of files, like zip

is there any solution for this ,or other format we can use?
User avatar
Dev Xpinator
 
Posts: 42
Joined: October 22nd, 2014, 1:16 am

Re: loading GAF zip in secure environments

Postby vadym.mitin » April 12th, 2015, 2:42 am

Hello,

You can do the following:
1) Embed GAF.zip files. Example you can find here http://gafmedia.com/forum/viewtopic.php?f=4&t=117#p426
2) Keep all GAF assets as folders that contain *.gaf and *.png files. Then load and convert GAF assets this way:
Code: Select all
var file: File = new File("project/GAFAssets/animation1");
// or you can specify path to the *.gaf file "project/GAFAssets/animation1/animation1.gaf"

var converter: ZipToGAFAssetConverter = new ZipToGAFAssetConverter();
converter.convert(file);
...

See the API reference here http://gafmedia.com/docs/starling/trunk/com/catalystapps/gaf/core/ZipToGAFAssetConverter.html#convert()
User avatar
vadym.mitin
 
Posts: 254
Joined: December 4th, 2013, 8:00 am

Re: loading GAF zip in secure environments

Postby Sergei Sorokin » April 12th, 2015, 2:51 am

Hi,
you can try and change file extension from *.zip to *.asset or *.gafpackage. I've tested it on our demo project and it works fine.
User avatar
Sergei Sorokin
 
Posts: 39
Joined: December 18th, 2013, 11:46 am

Re: loading GAF zip in secure environments

Postby Dev Xpinator » April 12th, 2015, 10:41 pm

hi,
thank for the answers

the embedding is not an option (have to keep the main swf small in size)
the "zip to folder" solution also could be problematic - will cause a lot of http requests, instead of one for all the assets..

i tried to rename the file extension , but i get server error. can't load the new extension file (loading using BulkLoader class)
do i need to change something in the loading method for it to work?
User avatar
Dev Xpinator
 
Posts: 42
Joined: October 22nd, 2014, 1:16 am

Re: loading GAF zip in secure environments

Postby Sergei Sorokin » April 13th, 2015, 7:30 am

https://dl.dropboxusercontent.com/u/752 ... Loader.zip
Simple project for you, it loads our demo animation from dropbox via BulkLoader. It works fine, maybe something wrong with your server configuration?
User avatar
Sergei Sorokin
 
Posts: 39
Joined: December 18th, 2013, 11:46 am

Re: loading GAF zip in secure environments

Postby Dev Xpinator » April 14th, 2015, 12:19 am

you are right. in your project it works.
i will try to figure out what i am doing wrong

thanks a lot :D
User avatar
Dev Xpinator
 
Posts: 42
Joined: October 22nd, 2014, 1:16 am

Return to Starling Playback Library

Who is online

Users browsing this forum: No registered users and 3 guests