Archive for the 'MXML/AS3' Category

Try, Catch, and Ignore

Saturday, January 12th, 2008

Before today, I used to write try/catch statements where I acknowledged the error but I didn’t want to do anything about it…
try
{
   new Error();
}
catch (e:Error)
{
   // Do nothing!
}
After today, I will be doing…
try
{
   new Error();
}
catch (ignored:Error){}
There is nothing earth shattering bleeding edge about this. However it’s one of those small tiny geek cool things about [...]

Adobe Flex/AIR vs. Silverlight vs. JavaFX vs. vs. Google’s Ajax RIA @ QCon 2007

Saturday, October 13th, 2007

I got an email for what looks to be a pretty cool conference that breaks my bank account. Scott Delap will be speaking at QCon @ San Francisco on “Emerging Client Technologies”:
The web has been in a state of transition since its inception. In the beginning there was basic HTML. As more complicated layouts were [...]

List-at-a-time functions in AS3

Friday, September 21st, 2007

eokyere posted a pretty cool article/tips on how to make some of your AS3 code elegant in the case of applying functions to entire lists.
/*
For example, we have a list of donuts, and we want
to see which ones have chocolate, and then later
decide to take chunks of bites out of them:
*/
 
for (var i:Number [...]

Using the Flex Datagrid’s “labelFunction”

Wednesday, September 5th, 2007

Someone once asked me if they had a datagrid column that displayed millions, billions, and trillions of dollars, how could they render it in a non-numerical way so it would show as:
1,000,000 = 1 Million
1,000,000,000 = 1 Billion
1,000,000,000,000 = 1 Trillion
The other requirement is that it must still be in a numerical format to apply [...]

Moock to be signing copies of EA3.0

Thursday, July 5th, 2007

From FlashInTO,
Venue: Resistor Gallery, 284e College St. (just west of Spadina), Toronto
Date: Wed July 25th
Time: 7:00 - 10:30
Cost: FREE!!!
Presentations
8:00 TBA
8:30 TBA
9:00 Colin Moock talks about his ‘Essential ActionScript 3.0′ book thats finally out! Copies will be available for purchase and signing.
Link is here
You have to be a geek to get an O’Reilly book signed by [...]

Stop Being A Trace-a-holic and Start Using the Debugger

Sunday, June 3rd, 2007

Rather than inserting trace() statements all over your code, forgetting where you put them, and then let another developer decrypt them or worse, obfuscate another developer from trying to understand the output, you ought to train yourself to use the Eclipse-style debugger.
It’s simple enough that you set up your breakpoints and then run the [...]

Video: Mike Potter’s Presentation on Apollo @ FlashInTO

Tuesday, February 6th, 2007

Rick Mason from FITC posted the Apollo Demo given by Mike Potter at January 31st meet. If it was on You Tube, it would be easier to embed the video but here’s the link to the presentation anyways.
http://www.flashinto.com/phpBB2/viewtopic.php?p=19532#19532
If you are in the Greater Toronto Area, the Flash In T.O. Flash Usergroup has monthly meetings. Visit [...]

Flex 2 Notes: World of Buttons

Monday, August 21st, 2006

Some notes I took going through the manual…
Old Fashion Button
Q: When to use a button control?
A: When you need to elicit user gesture to fire an event.

Quick Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
  xmlns="*"
  creationComplete="null">
 
  <mx:Button  id="btn"
        label="Hello World!"
        width="150"
        icon="@Embed(source='warning.gif')"
        click="myTextArea.text = btn.label"
        />
 
  <mx:TextArea  id="myTextArea"
          width="150"
          height="20"
          />
 
</mx:Application>

Pop-up Button Control
Q: When to use a pop-up button control?
A: When you want the button to take [...]

Type Conversions: Coercion vs. Casting

Monday, July 17th, 2006

Coercion
At run-time the Flash Player will implicitly convert the data type of a value into one that is suitable to be assigned.
For example, if number 5 is assigned to a variable of type Boolean, it will convert the 5 to a value of true and then store true in the variable.
Casting
In your code, you explicitly [...]

Notes: Dealing With Packages in AS3.0

Sunday, July 16th, 2006

In AS2.0, you would structure the class files of a project as one .as file for each class. Each .as file would declare a single class.
// Circle.as
class Circle
{
  public function Circle(){};  // constructor
}
Recall, packages in AS2.0 represented the directories where the source files resided. In AS3.0, this hasn’t changed either. If Circle.as was an ActionScript class file [...]