Archive for the ‘flex’ Category

Colin Moock’s AS3 From the Ground Up Tour

Wednesday, September 19th, 2007

Free training from Colin Moock? Okay, I’ll take it!

Moock will be giving an all-day training seminar on ActionScript 3.0 in NYC on November 12.

You can register while spots are still available at: http://www.adobeas3tour.com/

FlashVars in ActionScript 3.0

Monday, July 30th, 2007

FYI, when accessing FlashVars in AS3.0 you can no longer access them by _root.myFlashVar. Instead, use:

root.loaderInfo.parameters.myFlashVar

viewSourceURL: publish source in Flex

Monday, June 11th, 2007

publish-source.jpg

Call me slow, but this one eluded me for a little bit, as I couldn’t find a how-to in the Flex help documentation regarding publishing source code. It’s actually just as easy as pushing the Publish Application Source button–just keep in mind that it’ll rely on your primary MXML file as the index page of the source code.

Flex Chart Labels Based on Numeric Values

Sunday, June 3rd, 2007

I thought there’d be a way to inherently modify chart labels in Flex while basing them on the chart’s values. There doesn’t seem to be such a built-in property, however, you can easily use the labelFunction method. In the example below (right-click to view source), I’m setting a labelFunction of changeLabel on a LinearAxis tag. It calls a switch statement to determine what to relabel the value. Note: The relabeled values are all even numbers because the major ticks on the chart are even.

Resetting RadioButtonGroup in Flex

Sunday, June 3rd, 2007

Ever try resetting a RadioButtonGroup in Flex? I didn’t find it so clear… Unselected radiobuttongroups are set to “null”, but I tried setting all of the radio buttons selected = “false” to start. When that didn’t work, I then tried setting the radiobuttongroup.selectedValue = “null”.

The solution is to set radiobuttongroup.selection = null; in ActionScript. Sample and source code below.

Flex SecurityError: Error #2148 While Accessing local XML

Saturday, June 2nd, 2007

So you’ve published your Flex application that accesses local XML, but when you try to run it outside of your Flex Builder folder, you might get a Flash Player Debugger error #2148. I ran into this problem while on a tight deadline, and am reposting here to get the word out.

To fix this, you need:

  1. to right/control click your Flex Project folder in the Navigator
  2. Select properties
  3. Choose Flex Compiler in the popup window
  4. Add “-use-network=false” under Additional compiler arguments

flexproperties.jpg

Hopefully, this’ll save someone some time…

Helpful Flex Links

Thursday, May 31st, 2007

One fails to appreciate how valuable the blogosphere is until one starts working in a new/gradually adopted technology. In this case, I’ve been working on a Flex project for a few weeks now and have painfully learned some of the ins-and-outs of development despite the sparse blog content on the subject. Since online resources have been rather sparse to begin with, I figured I’d start adding to them.

To me, Flex is like doing Flash in a Dreamweaver atmosphere–you have your MXML (HTML), ActionScript (JavaScript), and CSS (or at least a subset of it). While I can definitely see the production value in Flex, I’m not sure I like it over plain ActionScript. I’ve been building a number of MXML components, and it drives me batty knowing I can’t implement an interface, use inheritance, and am forced to use getters and setters in my tags in order to set variables as MXML attributes. Should I place my styles in a separate CSS file, or include them in my component to encapsulate it? Hmmm…
Anyway, onto what I was posting for, here’s a helpful Flex style explorer that writes the CSS for you. Unfortunately, it doesn’t include all of the built-in Flex components, but it’s a great start.


Bad Behavior has blocked 349 access attempts in the last 7 days.