Scriptplayground Network

Archive for the 'Actionscript' Category

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.

by mkeefe on Nov 20th, 2007

Review: FDT 3 for Eclipse

FDT Professional BoxI have published a review on FDT 3 for Eclipse. This application is a wonderful ActionScript editor that when paired with the Flash code library makes it very painless to develop Flash applications.

The latest release has support for ActionScript 2 and 3 which is great considering even the latest version of Flash still has an integrated editor that needs help.

Once I get a few moments I will be writing up a few tutorials for FDT.. this of course will be after I have completed my Flash and PHP Bible.

Here is the full review

Update: FDT has linked to this review, pretty cool!

by mkeefe on Nov 8th, 2007

3D Browser with AIR and Papervision3D

Lee Brimlow has developed a fully interactive 3D browser using Adobe AIR and Papervision3D. The app surprisingly runs very smooth on my Mac and overall is very cool.

3dbrowser_pv3d.png

I hope to get some free time soon to work with PV3D but for now I just look at the cool apps being built with it.

by mkeefe on Oct 1st, 2007

Adobe Launches Flash Lite 3

More news from MAX.. Adobe has released Flash Lite 3

Here is the beginning (meat) of the press release.

ADOBE MAX 2007, CHICAGO - October 1, 2007 — Adobe Systems Incorporated (Nasdaq: ADBE) today announced the availability of Adobe® Flash® Lite™ 3 software, which now supports Adobe Flash Player compatible video and enables the delivery of dynamic Web content on mobile devices. Flash Lite 3 allows mobile device manufacturers, operators and content providers to differentiate their offerings by giving users the ability to watch Flash Player compatible video, the world’s most popular video format, and browse Flash enabled Web sites when integrated with a mobile Web browser. Both NTT DoCoMo and Nokia committed to deliver Flash Lite 3 enabled devices in upcoming releases of handsets. With over 300 Million Flash enabled mobile devices and handsets shipped so far, Adobe expects more than one billion Flash enabled devices to be available by 2010.

read more

Next »