I needed to draw some dashed lines and polylines for something I was working on. I was already using Degrafa and wanted to create the dashed lines by extending Degrafa. It was actually easier then I thought it would be.
You can see the finished result here and the view source code is enabled through right clicking. The two new classes DashedLine and DashedPolyline extend Line and Polyline and added two new properties “dash” and “gap”. You set these two values with the value of how big you want the dash and the gap to be. In the future this could be extended to have any number of dash/gap patterns but all I needed was a simple repeating one.
This was based on the Degrafa 1.2 swc but it should work for the 2.2* latest drops.
All the extending that was needed was to inherit the Line and Polyline class and override the preDraw() method. In the overridden preDraw() method I looped through the normal x,y cords and create extra commands based on the dash and gap properties that I exposed in the two new classes DashedLine and DashedPolyline.
NOTE: I did find the use of private member variables and methods in Line and Polyline to be restrictive and had to call super.preDraw() first to make sure some things where called. It still worked for my case but if you wanted to do something total different it was impossible to set the _setBounds correctly.
June 16th, 2008
There was a small change in Flex 3 that causes the RemoteObjectAMF0 class to not compile in Flex 3 apps. I have updated the class and the swc.
The updated RemoteObjectAMF0 code can be found in the renaun_com_RemoteObjectAMF0_flex3.swc in the zip file at - http://renaun.com/flex2/RemoteObjectAMF0/renaun_com_RemoteObjectAMF0.zip
NOTE: updated again to add a line to delete references to the responders after it is passed back.
June 16th, 2008
The release of RIALogger v1.5 for AIR 1.0 was not very stable and was in between a transition period. I originally thought I would get around to update it quicker. Well I finally updated to be more stable and better performance when viewing large amounts of data. A new UI update will hopefully come after this.
Get the newest application here.
May 16th, 2008
The default AMFPHP patterns for including classes defined in your AMF requests do not work for POG classes. The two default patterns that are check for class including by the AMF deserializer are:
PHP:
-
// $mappedClass = SomeObject
-
$mappedClass . "php" // SomeObject.php
-
// or
-
$mappedClass . ".class.php" //SomeObject.class.php
For POG classes the pattern is "class.someobject.php", regardless of the case of the SomeObject class.
Now to added different locations for AMFPHP to look for classes to include for deserialization of AMF requests you open up /amfphp/core/amf/io/AMFBaseDeserializer.php. Go to line 384 (as of AMFPHP 1.9 or the block of code starting with file_exists($GLOBALS['amfphp']['customMappingsPath']) and add the following code for POG classes pattern:
PHP:
-
elseif(file_exists($GLOBALS['amfphp']['customMappingsPath'] .
'class.' .
strtolower($mappedClass) .
'.php'))
-
{
-
$include =
$GLOBALS['amfphp']['customMappingsPath'] .
'class.' .
strtolower($mappedClass) .
'.php';
-
}
Now your AMF request classes passed in method parameters will be deserialized on the PHP to the correct POG class.
March 21st, 2008
The RIALogger has been updated to the latest AIR release v1.0.
You can get the more information about the RIALogger and the custom logging target here.
March 5th, 2008
Flex 3 Truchet Tiling example with 3 different class types, Triangle, Circular Arc, and Random Arc.
Continue Reading
March 4th, 2008
The ITunesMetadataReader application is a very basic AIR example of how to use the new Metaphile project to read out MOV (H.264) file metadata. The source of the project is included in the AIR application, to access it right-click on the application and click view source.
The Metaphile project is on google code and now includes an implemented MOVReader as well as an ITunesData class. It might not be the best name for it, but right now the class only reads out some of the metadata defined to by Apple's ITunes application.
The application was shown in the session I gave at 360Flex Atlanta. There other part of the session I showed how to play H.264 files in Flex and see all Metadata that the Flash Player reads in. You can see the live demo and source for the Flex app at:
http://renaun.com/h264/H264VideoTest.html
UPDATE: More general Flash Video info was also presented by David Hassoun at 360Flex Atlanta - check it out here (Titled: Latest Tips and Tricks With Flash Video in Flex)
February 26th, 2008
The QTIndexSwapper v1.4 update is to support AIR v1.0 and a small 64 bit atom size parsing fix.
In connection with this update I am speaking at 360Flex Atlanta tomorrow. I'll be showing how the QTIndexSwapper AIR application works. As well as demonstrating the use of H.264 metadata in the flash player. Not stopping there I went ahead and provide some classes for H.264 binary reading fun. The classes have been committed to a project called Metaphile. Metaphile was actually partially introduced during the last 360Flex conference in Seattle and was started by Ben Stucki (you should check his OpenFlux presentation out if you are at 360Flex). I added a MOVReader that reads out the "ilst" data from the "moov" atom from H.264 files. Basically it grabs iTunes type metadata out of H.264 formatted files, it even pulls out cover art that is embedded into the file.
Come to the 360Flex Atlanta session tomorrow to get a demo and more information about H.264 fun.
February 25th, 2008
In all the posts about Microhoo and "what would Microsoft do with XYC properties of Yahoo!" I haven't seen any mention of one acquisition Yahoo! made a while back. Its Jumpcut. Yahoo! snatched them up for only $150 million, compared that to what Google paid for YouTube. I know its different but I think Jumpcut has a nice feature set and very good usability. They also where one of the first ones out with full blown video editing on the web. Its all Flash/FLV based so it would be interesting to see what Microhoo would do with it.
February 1st, 2008
The RIALogger has been updated to the latest AIR release Beta 3.
You can get the more information about the RIALogger and the custom logging target here.
January 9th, 2008
Previous Posts