Scriptplayground Network

Archive for the 'Actionscript' Category

by mkeefe on Aug 7th, 2009

Learn how to work with PHP in Flex

Recently I wrote a two part series on building a Blog in Flex using PHP for the server-side part. These articles are available in the Flash and Flex Developers Magazine in your local book stores. However I have been informed that part 2 is available for free download (newsletter registration required). Earlier in the year part 1 was available for free, so it may still be on their site, let me know if you find it.

Also be on the watch for a new article in an upcoming issue that teaches you how to build a cool Flash application using Flickr and Yahoo! Pipes. Not exactly sure which issue it will be in, but keep an eye on my twitter page for more details when they are available.

by mkeefe on May 4th, 2009

FITC 2009 Toronto

Thanks to the Flash and Flex Developer Magazine I was able to attend FITC Toronto last week. This was the first time I attended this conference and can without a doubt say I will be going back next year. The sessions are all located close to each other so you can move around and truly create a custom experience, allowing you to learn the most.

Once the sessions are done for the day most attendees of other conferences hang out in small packs, but not at FITC. Every night there is a hosted party at a different venue where you get to meet all the attendees, drink and overall have a great time.

The number of cool people I met is quite long, I have a stack of business cards, phone numbers and all sorts of other material, but there is a small group of people that I must “shout out to”.

That list would be: Chris Allen, Stacey (bitchwhocodes), Jared Ficklin, Adam Bell, Dr. Woohoo, Richard Galvan, R Blank, Philip Kerman, Joanna, Marion, Catherine, Jonathon, Marcey and Samuel Agesilas.

Going back to the conference experience I posted a couple of cell phone photos over on my Flickr photo stream and a video of the Fire installation that Jared Ficklin had at the Mediatemple party.

Next Flash conference on the horizon.. Flash on Tap here in Boston at the end of this month!

by mkeefe on Nov 13th, 2008

Growl support for AIR applications

Mike Chambers has posted some very interesting information about Growl notification support over on his blog. This basically means that with the help of the Growl team, they have created a way for AIR applications to display messages via Growl, without Java or other external apps installed on the users system.

Update: It seems there is also a project for Windows notifications. Maybe this will be added to AIR soon as well.

by mkeefe on Jul 3rd, 2008

When semi-random bugs attack

I have been working on a large Flex project for a while now which has been a ton of fun. The core of the application is built in Flex with a class to manage remote calling to PHP files. This is basically how the data comes and goes through the application.

While testing and developing it locally I continuously ran small tests to ensure all the data was working properly and everything was. I decide to upload a build to my online environment for the client to check out and all of a sudden the Remoting classes were returning the same error:

Client.Error.DeliveryInDoubt
Message: Channel disconnected
Detail: Channel disconnected before an acknowledgement was received

This is usually caused by a syntax error in the PHP, but it worked locally.

Charles to the rescue (again)
I opened up Charles and started looking at the response from PHP, to which I found the following:

Fatal error: Uncaught exception 'VerboseException' with message 'file_exists(): open_basedir restriction in effect. File(/models/Debug.php) is not within the allowed path(s): (/tmp)' in /PATH_REMOVED/amfphp/core/amf/io/AMFBaseDeserializer.php:380

That is saying the file can’t be loaded from the root of the server.. well obviously, but the question is, why is AMFPHP looking for it there at all?

After talking to some friends and looking around the AMFPHP files I came across a function within the “globals.php” file.

setClassMappingsPath();

This allows you to set the path, which I did, but for some reason it was still failing. After some more time spent troubleshooting I found the function definition which can be found in “amfphp/core/amf/app/Gateway.php”.

function setClassMappingsPath($value) {
$path = realpath($value . '/') . '/';
$GLOBALS['amfphp']['customMappingsPath'] = $path;
};

The realpath() function seems to be the culprit. I am not saying this is an AMFPHP error, it could be a configuration error on this web server, which I will investigate further once the project is complete.

All I did to fix the error was comment out the realpath() check and set $path = $value. That stopped the incorrect loading of the class files and “magically” my Flex application started working properly once again.

When Errors are Good
The errors in this case were not all that helpful at first, but after looking into the code they really did paint a picture. The “Delivery in doubt” error that Flex throws will prove to be your best friend if you wind up with syntax or file errors within PHP.

by mkeefe on Jan 17th, 2008

CommandProxy : .NET / AIR Integration

Mike Chambers has posted information about a project that allows you to use AIR and other applications on your OS. You may remember the Artemis project from Effective UI, but recently (few months now) that project has been abandoned. It seems this new project, CommandProxy is a start in the right direction and it will be interesting to follow it.

You can find more information on Mike’s blog.

Note: This project is not supported by Adobe in any way, this is simply developers coming up with a solution.

Next »