Upgrading/Migrating to Flash Builder 4.6 and AIR 3 (JSON)

Dec
13

Type 1120: Access of undefined property JSON

If you’re using as3corelib like I’ve been using for quite some time now, you will notice this error.  To fix it you simply need to remove the following import (it may vary based on your project structure):

import com.adobe.serialization.json.JSON;

 

and then you’ll need to modify your code to replace:

JSON.decode(myString);
and
JSON.encode(myObject);

to:

JSON.parse(myString);
and
JSON.stringify(myObject);

 

You can find the full details of the new implementation of the native JSON support in AS3 on Adobe’s Reference Site

 

Updating/Migrating to Flash Builder 4.6 and AIR 3.1

Dec
13

Namespace 2.6 in the application descriptor file should be equal or higher than the minimum version 3.1 required by Flex SDK.  Unknown AIR application.xml Problem

Easy fix, just change:
 <application xmlns="http://ns.adobe.com/air/application/2.6">
to:
 <application xmlns="http://ns.adobe.com/air/application/3.1">

 

If you’re updating from a version earlier than 4.5, please reference this post about upgading to 4.5

Flex 4.6 mobile numeric keyboard

Nov
21

If you’re trying to use an TextInput or field that should only be a numeric input, you can use the attribute:

softKeyboardType=”number”

you can also set it to:

contact
email
punctuation
url
default

Hard copy (bootable) DVD of OS X Lion

Jul
20

Since CD/DVDs are so retro and useless according to ol’ Job’sy, the concept of a hard copy of OS X Lion (10.7) is ridiculous.  I’m all for ease of use when upgrading, but I still prefer doing clean installs of operating systems when there are major updates.  In Google’ing it up combined with acquired Mac tricks, I’ve come across a way to burn a hard copy (bootable) DVD version of Lion.  It’s pretty easy actually, so that’s good, but to the ‘again, again’ crack squad of a marketing people at Apple, they should mention this.  Anyways, this is how you can do it…

Once you’ve downloaded OS X Lion, don’t install it just yet.

Open up Finder and go into your Applications, look for Install Mac OS X Lion (.app)

Right click on it, and click Show Package Contents, drill down into ‘Contents/SharedSupport’

Select InstallESD.dmg and Copy it (right click or cmd + C) and paste is elsewhere (I just put it on my desktop)

Now we just need to burn it to disk, so open up the Disk Utility (Applications > Utilities > Disk Utility)

Click on the Burn Icon

Find where you copied the InstallESD.dmg file, everything else should be default
NOTE: You might have to drop the burn speed down if it fails

That’s it, should be set.

Hope this helped someone.  I still think that ol’ Job’sy should offer a hard copy option, until they’ve removed all cd/dvd drives for 2+ generations.

slainte

Deploying Adobe Air Native Installer to Mac and Windows

Jun
6

I’m currently working on deploying an application to both Mac OS X and Windows users with a native installer.  With such, I have discovered that you must build the native packages from within their respective OS’s.  Oddly enough, it was difficult to find anywhere that said this for certain, so I figured I would put this out there for the other seven people that will come across this question.  In my frustration with this inability I was complaining to a colleague that just so happened to work at Adobe before his current position.  He noted that he knew some of the fellas over at Adobe that worked within the Air team and offered to send along my question/concern as to why this wasn’t possible and if there were any plans to find a solution.  Turns out, the answer is no (for certain) and there are no plans for it in the future.  Reason being, which is understandable and what I assumed to be, is that the packaging utilizes “underlying OS facilities for the target platform”.  The full response was:

“The SDK doesn’t support cross-packaging of native installers because the
native installer creation code uses underlying OS facilities for the
target platform. For example, we use the Windows Installer libraries to
make the Windows installers; those libraries simply aren’t available on
Mac OS or Linux. There are no plans to address directly; it would be
expensive for us to re-implement and there are no plans to do so.”

I fully understand this and makes perfect sense.  The Adobe Air platform has spoiled me so much with the simple ability to deploy to nearly any environment that I was surprised when I finally came across something they hadn’t accomplished ( yet? one can only hope ).  I just wish they made it openly apparent that if you’re building a native installer that you must build each on the corresponding operating system.

I’m working on a basic framework that is intended to be used with Adobe Air 2.6+ (SDK 4.5+) allowing an easy way to build natively.  I’m using SVN as the version control because they provide a version number which allows for a better overall version management.  It’s also has a native updater with a AMF (PHP) and MySQL back-end so one can easily update the main app.  It uses Ant from the command line and versions the application automatically (including the *-app.xml file).  I hope to post it here soon.

Slainte.

Updating/Migrating to Flex 4.5 Air 2.6

May
17

So if you’re upgrading to Flex SDK 4.5 and Air 2.6 Adobe’s changing/moving things around again w/ the descriptor file (MyApp-app.xml).  If you get this error:

Process terminated unexpectedly.

invalid application descriptor: versionNumber must have a non-empty value.

Launch command details:  "/Applications/Adobe Flash Builder 4.5/sdks/4.5.0/bin/adl" -runtime "/Applications/Adobe Flash Builder 4.5/sdks/4.5.0/runtimes/air/mac"

All you need to do is replace this:

<version>0.1.0 Alpha 1</version>

With this:

<versionNumber>0.1.0</versionNumber>
<versionLabel>0.1.0 Alpha 1</versionLabel>

Also you may have an error prior to run:

Namespace 2.0.0 in the application descriptor file should be equal or higher than the minimum version 2.6.0 required by Flex SDK<.code>

Just change this:

<application xmlns="http://ns.adobe.com/air/application/2.0">

to this:

<application xmlns="http://ns.adobe.com/air/application/2.6">

Hope this helps someone.

Slainte.

 

PHP Benchmarking

Dec
19

Ok, so I’ve been informed that miscellaneous bits of information I’ve gathered over the years might actually be useful to others.  My good hooligan friend Morgan has commented this to me more than once now, so I’m going to start (or at least try to) provide these little pieces of enlightenment in this here blog.

Enough with the reasons, here’s something that has been tremendously useful, yet incredibly simple when it comes to constructing solid, efficient PHP code.

The PHP Benchmark

If you have any other sites similar to this, please do share them and I’ll add them to the list of helpful PHP resources.

Anyways, keep it useful and clean hooligans, Slainte.

Red5 0.9.1 and new experiments

Aug
6

So it’s been over a year since this hooligan has posted anything on the blog.  The dh’s have been on bit of a hiatus, but are back in the swing of things.  In the past year, there has been some learnin’ going on and some actual ‘experiments’ beginning.  The biggest is ‘the Sodium Salt experiment’ which will incorporate ‘the Frisbee experiment’ (more details of the frisbee to come).  The plan is to build out a framework based on a real-time system powered by Red5 (working title, dh:RTS) which will be integrated into, the soon to be open sourced, dh:Core (0.1).  The dh:Core is a work-in-progress all around server sided framework designed to work on a LAMP environment supporting RIA apps and eventually mobile (iOS and Android).   It’s built in PHP 5 and based on some existing popular frameworks and methods.

Anyways, I digress, the point of this post is to introduce the new Red5 magic  happening on the dirty hooligans front with the SodiumSalt experiment.  IM (with video capabilities), live webcasts/podcasts, music, movies, politics, sex, drugs and rock ‘n’ roll.  The expected initial release into the wild is by end of year and extended features to follow shortly after.

As things progress I/we will post updates and findings regarding the different adventures.  Most importantly, the plan is to open-source everything as they become stable and ‘clean’ (comments, docs, etc) so stay tuned my nerdtastic comrades.

stay dirty.

Red5 0.8 and the best tutorial to set up a dev environment

Jul
26

Ok, so in searching for the best way to set up a development environment and such; I have found the greatest up-to-date (Red5 0.8) tutorials.  Assuming you have Red5 installed somewhere to deploy or if you just want play around locally on your MacBook Pro, Mac Pro or any Intel based Mac OS X 10.5+, then I have waywardly and deliriously stumbled across the solution: TCP:1935′s Blog found HERE

I’m hoping to follow up some of this fine site’s tutorials with ‘side’ tutorials that will include MySQL usage, AIR, Flex, Flash and other interaction based coding.

Red5 0.8 Released

Jul
26

Ok, so red5 released 0.8 a month or so ago and I’ve been trying to figure out the best way install it w/ all needed dependencies and such like I did with 0.7 in a previous post. However, this release is bit less (conceptual) like the priors.  I’m still working on the automated script to install on CentOS and (hopefully most Linux flavors).  So please keep checking back for the script.