Wanna be successful? Â Penetrate. Â Advertising, marketing, self-promotion, facebook applications, anything really, get your name out there in the public consciousness, eventually people will look to you first (as long as you don’t drop the ball and start to suck). Â That’s why I admire most of the moves made by Adobe after the Macromedia acquisition. Â Open-sourcing their products means getting their name and software out there, and (hopefully) saturating the market with their products. Â On Ted Patrick’s post to whip people into a frenzy (totally successful, by the way) about the new software releases he stated “Remoting and messaging will never be the same!”, and I’d say it looks like that is going to be the case. Maybe I’m being over-optimistic, but I don’t have a hard time picturing amf data transfer replacing vast amounts of xml-based data tranfser after a short while. I know I’d certainly rather use amf any day.
FlashApe » archive for December, 2007
Gotta love penetration
- December 13th, 2007
- 10:15 am
Flash Media Server 3 officially announced
- December 4th, 2007
- 10:03 am
Adobe has announced the pending release of Flash Media Server 3. Looks like they did wind up totally revamping the licensing scheme, and split the product into two versions: Flash Media Streaming Server, which provides streaming-only capabilites, and Flash Media Interactive Server, which provides recording and scaling capabilites (it combines the new Streaming server with the Origin and Edge editions). Looks like both versions allow for unlimited connections and bandwidth, which is a great move by Adobe.
Setting the text color for the selected item in a List component in Flash CS 3
- December 3rd, 2007
- 6:20 pm
In AS2, there was a style named textSelectedColor that would allow you to set the text color of the text of a selected item in a list-based component. In Flash CS 3, it appears to have been removed, which means (unless I totally missed something obvious...if I did, please let me know) that you need to create a CellRenderer and let it set the TextFormat of the label based on whether it is selected or not.
CellRenderers have a property called selected to let them know if their particular row is selected. CellRenderers also have access to any custom properties of it's class. So what I wound up doing was overriding the drawTextFormat() method (which CellRenderer inherits from LabelButton), checking the value of the selected property, and if it's true, use a custom selectedTextFormat property of the CellRenderer to format the text.
Looking at the code will propbably be a bit clearer, it's very simple:
-
package {
-
-
import fl.controls.listClasses.CellRenderer;
-
import fl.controls.listClasses.ICellRenderer;
-
import fl.core.UIComponent;
-
import flash.text.TextFormat;
-
-
-
public class SelectedItemCellRenderer extends CellRenderer {
-
-
private var selectedTextFormat:TextFormat;
-
-
public function SelectedItemCellRenderer(){
-
super();
-
-
selectedTextFormat = new TextFormat();
-
selectedTextFormat.font = 'Verdana';
-
selectedTextFormat.size = '12';
-
selectedTextFormat.color = 0xFFFFFF;
-
}
-
-
override protected function drawTextFormat():void {
-
// Apply a default textformat
-
var uiStyles:Object = UIComponent.getStyleDefinition();
-
var defaultTF:TextFormat = enabled ? uiStyles.defaultTextFormat as TextFormat : uiStyles.defaultDisabledTextFormat as TextFormat;
-
textField.setTextFormat(defaultTF);
-
-
var tf:TextFormat = getStyleValue(enabled?"textFormat":"disabledTextFormat") as TextFormat;
-
-
if(selected){
-
tf = selectedTextFormat;
-
}
-
-
if (tf != null) {
-
textField.setTextFormat(tf);
-
} else {
-
tf = defaultTF;
-
}
-
textField.defaultTextFormat = tf;
-
-
setEmbedFont();
-
}
-
-
-
}
-
-
}
As far as the Flex components, they still have the textSelectedColor property.