Archive

Archive for April, 2008

Switched to Ubuntu and all is well

April 20th, 2008

Update: After three days of using the Flex Builder plugin i just relized that it does not support design view yet! Well that would be nice!

Running Ubuntu as my primary OS and AIR, Flex Builder Plugin, PDT, Charles, Vmware Workstation FileZilla, all work great. It took me longer to backup everything from my Vista install than it did to get everything back up and going. Vista was my first Windows OS since Windows ME when I switched to Linux. Post college (aka cash) I became a mac guy but purchased a Dell M90 about a year or more ago when the whole switching to the intel architecture thing was going on. I had two power macs in a row that the monitor stoped working and out of frustration moved to what seemed like a super powerful laptop. Although I liked OSX 10.0 – 10.3 the powerpc hardware left me with a lot to be desired and I still hope that other hardware vendors can someday install OSX. I decided this weekend that there was no way I was getting a new mac any time soon and with the change to Linux I may never go back. Unfortunately I still need Flash CS3 which requires windows so VMware it is until Flash looks a lot more like eclipse.

Flash Platform

MN.SWF/Camp/ presentation files

April 7th, 2008

Here are the files for the presentation that I am giving today at MN.swf Camp. Now that it is one in the morning and Minneapolis is 3.5 hours away I better head off to bed. I hope they have quality coffee!

Presentation in PDF, Database Creation, Examples
amfphp-swfcamp.zip

Speaking

Flash Player 9.0.124 beta allows testing against security model changes

April 6th, 2008

Trying to find a way to test your sites compatible with the new Flash Player security model! The newest/test Flash Player is in Flex 3 Beta download called ‘Adobe Add-ons’ for Open Source Flex SDK bundle that is about 58MB. You can download here: http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+3

Download the latest nightly build as the milestone release has the released Flash Player 9.0.115.

Adobe Add-ons for Open Source Flex SDK – This package contains all of the items that are in the Adobe Flex SDK and not in the Open Source Flex SDK. Downloading this file will allow you to bring the Open Source Flex SDK to parity with the Adobe Flex SDK. This package includes the Adobe Flash Player, Adobe AIR, the advanced font encoding libraries, and the code that allows licensing of things like the Data Visualization components. All of these elements are licensed under the Adobe Flex SDK license.

I downloaded the nightly build from and traversed the extracted zip for my windows computer to

flex_sdk_3.0.1.1092_add-on\runtimes\player\win\Install Flash Player 9 Plugin.exe

ran the installer and was up and running with Flash player 9.0.124 installed in Mozilla.

Preparing for the Flash Player 9 April 2008 Security Update
Read this post for how to make changes for amfphp:

Updated: crossdomain.xml fixes amfphp for april flash player release

Thanks Peter Kehl for getting me an updated link!

Check Out Flash Switcher a firefox plugin that allows you to run lots of flash player versions. This way you can use this for testing but keep your debug player installed as the default for Flex Builder!

AMFPHP, ActionScript 3, Flash Platform

AMFPHP Browser syntax for testing services.

April 6th, 2008

The Service Browser uses the remoting gateway to present a list of service classes and their methods. By selecting one of your methods, you will be presented with a page that allows you to call it; by entering arguments and observing the output in the “results” tab below, you can test remoting methods here.

The text inputs for arguments accept arguments in JSON (JavaScript Object Notation) or “object literal” format; essentially, valid ECMAScript (JavaScript/ActionScript) syntax.

String arguments can be entered directly without requiring quote marks, and number arguments can be entered directly as well.

To pass an array as an argument, use the JSON/ECMAScript array literal syntax – comma-separated values between square brackets. For example, if the parameter expects an array of numbers, you would enter it something like:

[1, 3, 5.5, 44]

A two-dimensional array in JSON format is entered as an array of arrays like this:

[[1, 2, 3], [5, 7, 15], [1, 7, 2]] .

Objects (such as VOs) can also be input here, using JSON/ ECMAScript object literal syntax like this:

{id: 1, label: ‘A label’, notes: ‘Some notes’}.

Objects and arrays can also be nested inside each other:

[{id: 1, label: ‘first object’}, {id: 99, label: ‘object with an array in it’, numbers: [13, 44, 97]}, {id: 34, label: ‘object with another object in it’, thing: {‘things’: 14, ‘gadgets’: 6, ‘tchockies’: 0}}]

In addition to numbers and strings, these are all valid types of arguments an AMFPHP remoting method can accept.

For more about JavaScript/ActionScript array-literal syntax and the object/associative-array duality of ECMAScript, consult your friendly neighborhood Internet.

Note that for some reason the service browser does not much care for double-quotes, so when entering object arguments, use the single-quote format for strings.

Also note that currently, although PHP supports optional arguments to a method by specifying a default value in the method signature, the service browser does not have a way to “skip” entering an argument. If you leave an input box blank, the parameter will receive an empty string.

AMFPHP, Flash Platform

apache mod_security oddity in AMFPHP

April 3rd, 2008

An AMFPHP user gave me a run for my money on debugging an error on a new server. Come to find out mod_security can play a little havoc on AMFPHP and even though the gateway.php file executes correctly. When you open up the amfphp/browser you will get the following error which will also be your fault event in your application.

(mx.rpc::Fault)#0  errorID = 0faultCode = "Client.Error.MessageSend"faultDetail = "Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed"faultString = "Send failed"message = "faultCode:Client.Error.MessageSend faultString:'Send failed' faultDetail:'Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed'"name = "Error"rootCause = (Object)#1code = "NetConnection.Call.Failed"

description = "HTTP: Failed"

details = "http://somedomain.com/amfphp/gateway.php"

level = "error"

when you call a service it gives the following error.

403 Forbidden

Forbidden

You don't have permission to access /amfphp/gateway.php on this server.

Additionally, a 404 Not Found

error was encountered while trying to use an ErrorDocument to handle the request.

Apache/1.3.39 Server at domainname.com Port 80

So if you are seeing this error when you try and connect to your gateway in charles / service capture look at a phpinfo page and see if mod_security is installed. If it is then in order to fix this error you need to create an .htaccess file in the amfphp/gateway.php directory and place the following content in it.

<ifmodule>SecFilterInheritance Off </ifmodule>

Hope that helps. If anyone knows more about this module please let me know what really is going on as I would love to understand why a security module is stopping amfphp.

AMFPHP, Flash Platform