Skip to: Site menu | Main content

Welcome to JasonHolden.com

Here you'll find information about my work and services.

Blog...

URL variables in Flex.

I want to access the URL variables in the URL of the page that launches my Flex application.

The problem:

There is no built-in way to access the querystring or url variables from inside Flex. Any parameters must be passed in as flashvars.

I scoured the web and found this:

How to get URL query-string variables within Flex application

Pretty neat code. Abdul is basically calling the browsers built-in javascript methods for retrieving the URL and querystring values. It doesn't require any additional/custom javascript.

I didn't integrate the class with my code. My needs were simple and could be handled differently within the confines of Flex/Flash.

What this has really done is open my eyes to the ExternalInterface API. The API provides facilities for interacting with the Javascript on the calling page.

If you need easy access to your URL params or just want to see a demo of the ExternalInterface API you should check out Abdul's code.

Javascript Sorting.

Here's a great article on Javascript sorting. It covers creating a custom sorter function.

http://www.breakingpar.com

Extending a Yahoo UI widget.

Recently, I had the need to determine if a YAHOO.widget.TextNode with a specific label existed within a parent node, also an instance of YAHOO.widget.TextNode. I decided to create a custom YAHOO.widget.TextNode by extending the class. This is the first time I've tried to use any OO javascript. I was quite pleased with how easy I could extend any class. Thanks mostly to the excellent documentation provided by Yahoo.

Here's how I did it:

I started by creating node.js to hold my class definition:

I created a custom namespace "JTC.widget"

YAHOO.namespace("JTC.widget");

Create a constructor with the same signature as YAHOO.widget.TextNode and chain the superclass constructor.

YAHOO.JTC.widget.Node = function(oData, oParent, expanded) {
YAHOO.JTC.widget.Node.superclass.constructor.call(this, oData, oParent, expanded);
};

[More]

Javascript Debugging

I just found this really cool tool:

http://addons.mozilla.org/firefox/1843/

It's called FireBug and it's an interactive debugger. It makes debugging javascript a snap!

BlogCFC was created by Raymond Camden. This blog is running version 5.7.002.