Silverlight creating ZIP files in MAC

If you are creating a Silverlight document in a MAC be aware that if you create a ZIP file from the Finder context menu “Create Archive of…” every time you try to access the files inside the ZIP file with Silverlight it will fail. Why? Not sure but I would assume something to do with the way MACs compress files compared of how PCs do. One way to get around this issue is by creating your ZIP files with “DropZip”, you might be able to create ZIP files with a different program that will run fine with Silverlight.

Silverlight error AG_E_RUNTIME_METHOD 2207

I am doing some testing with Silverlight (I know right!) and I kept getting error #2207 without really getting a detailed description. Well the issue -in MY case- was hat i was trying to download a file cross-domains, and with most plugins it was a no-no. So I just needed to change the source to local file.

Good:“GET”, “image-4.jpg”);
Bad“GET”, “”);

Adobe Air SQLError: ‘Error #3119: Database file is currently locked.’, details:’null’, operation:’execute’

For the longest time I was having issues with this Adobe Air Error and its description, the main issue is that the “details” for this error are “null”. We do get the description that the database is locked but no details on file name where the error occur or line number.

If you do a search in the Adobe documentation you will get a pretty blank line after the error:

3119 Database file is currently locked.

To solve the issue once and for all what the error means is that you have a connection open to make changes to the database and you have opened a new connection to make more changes to the database. So there are 2 solutions

1. Use the first connection to make your second updates
2. Close the first connection and then you can use the new connection

Continue reading Adobe Air SQLError: ‘Error #3119: Database file is currently locked.’, details:’null’, operation:’execute’

Adobe Air CreateDirectory common error

If you need to create a directory from Air and you dont know how, mostlikely you will use the Adobe Air Documentation and use something as the following:

var directory = air.File.documentsDirectory;
directory = directory.resolvePath(“AIR Test”);

air.trace(directory.exists); // true

it all looks nice and makes sense but in the real world it wont work, you would get an error like this:

Type Error : Value undefined ( result of expression air.File.createDirectory ) is not object.
# of your code error.

The problem with this approach is that the createDirectory method doesnt take any parameters, if you try to pass values directly to the method you will get this error:

Argument Error : Error #1063: Argument count mismatch on flash.filesystem::File/createDirectory(). Expected 0, got 1.

Once i was able to get this error I realized that the docs were wrong, or at least on this specific section. So looking at a different sample I figured out this works:

var directory = air.File.documentsDirectory;
directory = directory.resolvePath(“Air Test”);
directory.createDirectory();//no parameters necessary, Air knows where we need the new directory.

By first “asking” Air if the directory exists then Air knows where to create the new Directory rather than passing the property directly to the method.

This applies to Adobe Air SDK 3.0 and using Javascript

Tags: , , ,

Adobe Removing restrictions on use of the SWF and FLV/F4V format via the Open Screen Project.

The Open Screen Project is working to enable a consistent runtime environment – taking advantage of Adobe® Flash® Player and, in the future, Adobe AIRâ„¢ — that will remove barriers for developers and designers as they publish content and applications across desktops and consumer devices, including phones, mobile internet devices (MIDs), and set top boxes.

Adobe – Open Screen Project

Tags: , , ,