Ran into an issue today with AMFPHP trying to send an ArrayCollection…it kept choking when trying to decode the collection. I knew this was already possible, but forgot I had installed the php extension AMFEXT, which handles the encoding/decoding for amfphp when it is installed. Turns out that it doesn’t like incoming arraycollections. Disabling the extension fixed my problem, but I would sure like find a way to get them working together.
FlashApe » archive for March, 2008
AMFEXT doesn’t handle incoming arraycollections
- March 30th, 2008
- 12:15 pm
BorderSkin on top of children
- March 27th, 2008
- 1:39 pm
Sheesh...I just wasted half a day trying to figure out how to get a borderSkin to appear on top of all the children in a custom component I was building. It was a subclass of Canvas, so it was really easy...now that I know, it seems so obvious I want to kick myself. Anyway, you just need to do:
-
override protected function layoutChrome(unscaledWidth:Number,unscaledHeight:Number):void{
-
super.layoutChrome(unscaledWidth, unscaledHeight);
-
-
//move the border in front of the children
-
rawChildren.setChildIndex(rawChildren.getChildByName('border'), rawChildren.numChildren - 1);
-
-
}
IMagick - ImageMagick extension for PHP
- March 25th, 2008
- 9:30 am
If you're spending a decent amount of time manipulating images in php using GD or command-line ImageMagick, you should check out the Imagick php extension. Imagick provides an object-oriented interface to the ImageMagick API.
As far as I can tell, this extension was left for dead a while ago but revitalized over the last year or so and is now rockin pretty hard. The developer is pretty responsive on the Imagick board at the ImageMagick forums as well, and he's got lots of nice code tidbits on his own blog.
There is also the MagickWand For PHP extension, but I found the syntax pretty odd to deal with, it probably relates more to the way GD works than the OO style of Imagick.
Notes on Control Bars in Flex
- March 21st, 2008
- 8:39 am
Two quick notes related to Control Bars in Flex. First, I was trying to get an ApplicationControlBar to dock to the bottom of the app, which I couldn't get to work. Maybe someone could point out a better solution, but I went with using a DockableToolbar from the awesome flexlib and setting draggable=false.
The other thing is if you want a ControlBar at the top of a panel, you can just actually just use an ApplicationControlBar wrapped in a VBox.
Flex container rounded corners
- March 19th, 2008
- 5:32 pm
Just putting this up there in case anyone else needs it: if you are trying to get rounded corners on your container (like HBox) by setting the cornerRadius style, you need to make sure that you also set the borderStyle to 'solid' or the rounded corners won't render. You can set the borderThicknessProperty to "0" to hide the border.
Detroit-Area AIR developer needed
- March 19th, 2008
- 4:04 pm
If you are in, or can get to, or would like to travel (travel expenses paid) to Detroit next week to work on a small AIR (Flex) project then please leave a comment or shoot me an email.
Flex binding to numbers and increment issue
- March 5th, 2008
- 3:40 pm
Anyone know what's going on here? I have a property on a model that is bindable:
-
[Bindable]
-
public var currentAmount:Number = 0;
I have a command that increments that value, by some fractional amount:
-
[Bindable]
-
model.currentAmount += 1.25;
What's happening is I am winding up with values like 1.25000000000000000001. Even wierder is that the last digit increments with how many times the variable is incremented, so so if I add another .50 to the previous value, I wind up with 1.75000000000000000002.
Currently I'm using a setter and fixing the problem by using toFixed(2), but that seems very retarded:
-
_currentAmount = newValue;
-
var s:String = _currentAmount.toFixed(2);
-
_currentAmount = Number(s);
I'm sure if this was a bug it would be pretty well known by now, but I can't seem to find anything on google, so I'm guessing I'm doing something wrong. Anyone have an idea?