AMFPHP chapter 7 Files for Essential Guide to Open Source Flash.

August 28th, 2008

Updated file for Essential Guide to Open Source Flash chapter 7. There were several files that were missing on book website. I am working on getting that updated but until then here they are! Chapter Files

Thanks to those that pointed this out:
http://wadearnold.com/blog/?p=32

AMFPHP, Flash Platform

Arial & _sans font size 11 crop’s textfield

August 11th, 2008

TextField in Flash CS3 can’t render default fonts without cropping text. Look at the image below as it really showcases the W getting cropped out.

renderissue.png

This is to bad because there are only so many fonts that you can assume to use without having to embedded an additional font. Thanks JJ for getting to the bottom of this issue!

wdemo.swf

ActionScript 3, Flash Platform

AMFPHP 1.9 Update in SVN

August 1st, 2008


I have updated the SVN repository to fix a couple issues that were found over the last couple months. If you are a major amfphp user please check out a version and test that nothing else was broken, ;-) , and that these issues where resolved for you.

 

  • Bug Fix to handle ByteArray when ByteArray already exists.
  • Bug Fix for PHP5 overridden ArrayAccess and ArrayObjects with an explicit type
  • Update to handle disk I/O of finding services faster.
  • Update to handle disk I/0 for class mapping faster.

 

https://sourceforge.net/svn/?group_id=72483

 

As a heads up I am trying to get a final bug free release that STILL has php4 support.

AMFPHP, Flash Platform

Adobe to contribute AMF support to Zend Framework

July 30th, 2008

The cat is out of the bag. Go read Andi’s post!

Adobe to contribute AMF support to Zend Framework

Flash Platform, Zend_Amf

Lee Brimlow did an awesome tutorial on AMFPHP

July 30th, 2008

Lee Brimlow posted a New video tutorial on using AMFPHP and it is very good.

Learn how to install AMFPHP and create a simple service that sends email

It covers the majority of what you will need to know in order to really get a grasp on AMFPHP. Thanks Mike Potter for pointing out this great asset.

AMFPHP, Flash Platform

Speaking at ZendCon 2008: Leverage Zend Framework for your next Flex RIA

July 21st, 2008

I am speaking about a project that I have been working on with Adobe and Zend at ZendCon this year. I am supper excited about this advancement as it brings together to languages that I love. Drop a comment if you are thinking about going or want to meet up. Also if there is something specific that you want to see in the presentation let me know! Session information should be released in the enxt couple weeks on the ZendCon website under RIA

ActionScript 3, Flash Platform, Zend_Amf

Embedded/Hardened Flash Media Server 3 on X/Ubuntu Hardy Heron 8.04

July 16th, 2008

A mil spec hardened FMS server and raw video stream publisher were required in order to stream drive camera , ptz and thermal surveillance video over  RTMP streams from a robot back to a Flex user interface. I opted to use a PC-104 stack from to meet the temperature requirements and a mil spec hard drive. I also used a PC-104 4 input frame grabber in order to get all four robot cameras online. The frame grabber showed up as  /dev/video0 with all four channels and we had to write a crop tool that brook the four quadrants of data and placed them onto vloopback V4L2 buffers.  The new Flash Player 10 beta2 player was not able to pick-up vloopback as a valid V4L2 device so I opted for using the FlashCam project to convert my V4L2 device back to V4L. I used an AIR application that picked up the four streams and “published” the video at it’s highest quality to a localhost FMS server. Because of this need I had to have an X sessions so I used Xbuntu as the operating system. It is pretty slick install as it gets rid of all the traditional junk the Ubuntu desktop has in order to keep it fast. I assume that I could have cut down RHEL and gone with a supported FMS server but the following information will tell you how to get a dev version of FMS up and running on Xbuntu 8.04.

To install Flash Media Server on the box I had to follow the patch process outlined by Markus Bertheau and the first half of these steps were taken from this aYo Binitie II.

The following process gets Flash Media Server installed properly.

Download Flash Media Server

Install the additional libraries needs to run FMS on Ubuntu

$ sudo apt-get install libnspr4-dev

Unzip the download which for me was on my Desktop

$ unzip Flashmedia3_Int_Strm_ALP.zip
$ cd Flashmedia3_Int_Strm_ALP

$ tar xvzf FlashMediaServer3.tar.gz

Download and install the patch

$ cd FMS_3_0_1_r123/
$ wget http://www.bluetwanger.de/~mbertheau/flash-media-server-3-ubuntu.patch
$ patch -p1 < flash-media-server-3-ubuntu.patch
$ sudo ./installFMS

I ran with the defaults on everything. If you have Group issues then the patch did not work properly!

Installation complete! Double check

$ sudo /etc/init.d/fms restart
$ tail /var/log/messages
Jul 16 08:24:10 wade-laptop Service[21193]: Server stopped .
Jul 16 08:24:10 wade-laptop Service[22858]: Server starting…
Jul 16 08:24:10 wade-laptop Service[22858]: Server started (/opt/adobe/fms/conf/Server.xml).
Jul 16 08:24:10 wade-laptop Adaptor[22878]: Listener started ( _defaultRoot__edge1 ) : localhost:19350/v4
Jul 16 08:24:10 wade-laptop Adaptor[22878]: Listener started ( _defaultRoot__edge1 ) : 1935/v4
Jul 16 08:24:15 wade-laptop Service[23053]: Server starting…
Jul 16 08:24:15 wade-laptop Adaptor[23053]: Listener started ( FCSAdminIpcProtocol ) : localhost:11110/v4
Jul 16 08:24:15 wade-laptop Adaptor[23053]: Listener started ( FCSAdminAdaptor ) : 1111/v4
Jul 16 08:24:15 wade-laptop Service[23053]: Server started (./conf/Server.xml).

$ ps -e | grep fms
22858 pts/1    00:00:00 fmsmaster
22878 pts/1    00:00:00 fmsedge
22881 pts/1    00:00:00 fmscore
23053 pts/1    00:00:00 fmsadmin

Now to add an application and set proper permissions. I had a PTZ applications folder on my desktop with the new FMS app that I wanted installed. The following commands are necessary because you need to first make the applications owned by the user and group fms and then you need to remove the setuid bit that is added.

$ sudo cp ~wade/Desktop/applications/PTZ /opt/adobe/fms/applications/PTZ
$ ls -la /opt/adobe/fms/applications/ | grep PTZ
drwx–S—  2 root fms 4096 2008-07-16 08:52 PTZ
$ sudo chown -R fms:fms /opt/adobe/fms/applications/PTZ
$ sudo chmod 755 -R /opt/adobe/fms/applications/PTZ
$ ls -la /opt/adobe/fms/applications/ | grep PTZ

drwxr-sr-x  2 fms fms 4096 2008-07-16 08:52 PTZ
$ chmod -s -R /opt/adobe/fms/applications/PTZ
$ ls -la /opt/adobe/fms/applications/ | grep PTZ
drwxr-xr-x  2 fms fms 4096 2008-07-16 08:52 PTZ

Note that the setuid bit has changed from s to x

$ sudo /etc/init.d/fms restart

 

Your good to go now! Start using FMS like the documentation says and everything will work fine.

FMS, Flash Platform

Why OOP AMF serialization?

July 13th, 2008

In response to some questions and emails

The specification for AMF serialization define a type market for each data type. There are 13 types in AMF A type marker is one byte in length and describes the type of encoded data that follows. The general data type is very simple to handle but what is more inportant is when a second byte exists called the ecoding type byte. Type markers may be followed by the actual encoded type data, or if the marker
represents a single possible value (such as null) then no further information needs to be encoded.
What data type you need to serialize based on the first byte of data field. Once you get this type you there. This is fine if you have all the time in the world to implement every type in the specification. However most people when they think of array they think of just one type. But there are three types of arrays defined by AMF and if you really want a complete implementation you need to handle all three. Outside of teh speficication people really think of AMF as Life Cycle Data Services. I need AMF in php usually is someone implying that they want all the functionality of LifeCycle DS in PHP. This is really where the OOp functionality comes into play. A fully imlemented AF gateway falls well short of LifeCycle. In the next serialization implementation that I am working on it has to be able to add these additional mapping tools that are more generic than class mapping your custom classes to be a part of the release. A common request is ArrayCollections. Class mapping ArrayCollections is something that you need in almost every Flex project but it really is not part of the AMF specification. In this specific case AMF would treat the incoming Data as an object type which it is. By using a more OOP implementation it is easy to add this as an object type but then also used an optimized ArrayCollection handler that is part of the core library’s without having to have everyone role there own.

Headers fall into this too. Most developers like to toss additional session specific or session instantiation specific data into the AMF header. The new aproach allows you to create your own handlers for those headers and of course support the defined amf_server_debug, Credentials, DescribeService.

ActionScript 3, Flash Platform, Zend_Amf

New PHP<->AMF serialization done!

July 11th, 2008

I have been working on a new code base for Amf to PHP Serialize’er and it all seems to be working. I am super excited about this! Mostly because I have spent the last 5 weeks working on building the architecture the way that I have always wanted it and it actually worked! It makes it super easy to make new amf/value/newtype.php so that the filter can be applied to the byte type coming in. You can also add amf/header/types.php so that you can easily deal with incoming AMF headers for things such as security. My hope is that this architecture keeps serialization advancements available to other developers so that it is not always on the project leads. So far the tests are really fast even with additional OOP functionality.

This is the last 38 hours of consumption minus starbucks trips and office coffee just so that I could make Mike Potter happy.

Love!

thebull.jpg

ActionScript 3, Flash Platform, Zend_Amf

It’s Here! Essential Guide to Open Source Flash

July 9th, 2008

Just got my author copies of The Essential Guide to Open Source Flash. Obviously I am excited to see my name along with many of my friends and fellow flash zealots on the cover of this book. I have thumbed through the book and I am super excited to take the time to read the other chapters. There is already a lot of stuff that I started looking into to improve what I do. I want to thank Apress for putting up the cash to have those of us in the open source community do a professional job on documenting these great projects. I have found that one of the biggest difference between paid software and open source is documentation. Paid software usually has more documentation than functionality and open source can do everything you ever wanted as long as you watch the mailing list for year! Again thanks Apress, fellow authors, and please run out and buy a copy!
Books Done
If I any idea how to monetize my blog I would have some nuts amazon referral thing but just go get a copy! I need to talk to Aral on that at some point~!

AMFPHP, ActionScript 3, Flash Platform