Return to Starling Playback Library

loading zip gaf from local storage

Questions related to Starling playback library should be asked here.

loading zip gaf from local storage

Postby Dev Xpinator » December 22nd, 2014, 6:15 am

when i try to load a gaf zip from local storage i get the following error: "Unknown record signature"
any idea's what is the problem?
User avatar
Dev Xpinator
 
Posts: 42
Joined: October 22nd, 2014, 1:16 am

Re: loading zip gaf from local storage

Postby vadym.mitin » December 22nd, 2014, 7:24 am

Hi,

Seems like you're trying to load compressed zip. Starling GAF library can't uncompress compressed files in ZIPs. If you modify zip file please make sure that you save it uncompressed.
User avatar
vadym.mitin
 
Posts: 254
Joined: December 4th, 2013, 8:00 am

Re: loading zip gaf from local storage

Postby Dev Xpinator » December 22nd, 2014, 11:08 pm

i removed the compression option, but still getting the same error.
also the starling library have no problem uncompresing compressed zip's from the server, so i don't understand what's the difference.. :?
User avatar
Dev Xpinator
 
Posts: 42
Joined: October 22nd, 2014, 1:16 am

Re: loading zip gaf from local storage

Postby Dev Xpinator » December 23rd, 2014, 2:02 am

ok, so it seems that the problem is with how i save the file. but the zip files (local and server) looks exactally the same, so i have no idea what's the problem with the local file i save.

this is how i save it to local storage :

Code: Select all
var bytes:ByteArray;
bytes = new ByteArray();
bytes.writeObject(contentLoaded);

var fileStream:FileStream = new FileStream();
fileStream.open(assetsFile, FileMode.WRITE);
fileStream.writeBytes(bytes, 0, bytes.length);
fileStream.close();
User avatar
Dev Xpinator
 
Posts: 42
Joined: October 22nd, 2014, 1:16 am

Re: loading zip gaf from local storage

Postby Dev Xpinator » December 23rd, 2014, 2:19 am

found it!
this is how the code should be :

Code: Select all
bytes = contentLoaded as ByteArray;
var fileStream:FileStream = new FileStream();
fileStream.open(assetsFile, FileMode.WRITE);
fileStream.writeBytes(bytes, 0, bytes.length);
fileStream.close();


now it works! :)
User avatar
Dev Xpinator
 
Posts: 42
Joined: October 22nd, 2014, 1:16 am

Re: loading zip gaf from local storage

Postby vadym.mitin » December 23rd, 2014, 4:45 am

Cool! Glad to hear that you fixed the problem by yourself.
User avatar
vadym.mitin
 
Posts: 254
Joined: December 4th, 2013, 8:00 am

Return to Starling Playback Library

Who is online

Users browsing this forum: No registered users and 1 guest