Archive for November, 2005

Google Analytics – Up and Running

Google Analytics seems to be up and running now. I know many of us tried it out when it was launched this week, set up our pages, and then watched as no results came back. 12 hours, 24 hours, 36, 48 and still nothing.

Finally, last night I saw results come in. Below is a static of my GeoMap so far. Hmm…. wonder if they have a Flash API?

GeoMap

Update to Date Formatter

UPDATE: I guess I didn’t think this one through completely. If you are using a component such as the DateChooser component or other class that returns a Date Object, using the Date2 Class will be of no use. So using the DateFormatter static class makes far more sense. Thanks Darron for the heads up on this one.

The other day I updated Darron Schalls dateFormat.as into a static class. Not sure why I just didn’t extend the Date class.

Anyhow.. I’ve made the quick change. You can download the Date2 Class here along with a sample FLA [LINK]

Sample code:
[as]
import Date2;

var now:Date2 = new Date2();

trace(now.formatTo(“mm-dd-yyyy”));
trace(now.formatTo(“mmmm d, yyyy”));
trace(now.formatTo(“mm/dd/yyyy”));
trace(now.formatTo(“d-mmm-yyyy”));
trace(now.formatTo(“ddd, mmmm dd, yyyy”));
trace(now.formatTo(“short”));
trace(now.formatTo(“medium”));
trace(now.formatTo(“long”));
trace(now.formatTo(“full”));[/as]

Learn something new every day

That’s what I love about Flash and the Flash community. Not a day goes by that I don’t learn something new that somehow I missed.

I had a few minutes today and was just poking through George Medve’s TweenExtended Class [LINK] in SEPY and noticed “OnEnterFrameBeacon.init();”. Hmm.. I hadn’t seen that before.. So curious as I am, I researched it and came up with blog article written by Darron Schall back in Jan. 2004 [LINK]. Wow! How did I miss that? Or maybe I saw it and at the time didn’t have time to absorb it.

Anyhow.. the jist is that you can attach onEnterFrame’s to objects without having to hassle with creating your own movieclips and managing them. Pretty cool.

[as]
import mx.transitions.OnEnterFrameBeacon;

OnEnterFrameBeacon.init();

var myObject:Object = new Object();
myObject.onEnterFrame = function() {
trace(“nice!”);
}
MovieClip.addListener(myObject);[/as]

That’s the 2nd Kudo’s to Darron this week. DateFormatter Class

DateFormatter static class (update of Darron Schalls dateFormat.as)

I was at a ColdFusion 101 demo the other day at our Las Vegas User Group meeting and was watching Dave Byer use the CF Date formatting using masks. I had always thought that was something Flash needed built-in and I figured someone must have already built this. I started to look around and found a couple of things. The first was Darron Schall’s dateFormat.as which was his port of ColdFusions’s date formatting. I also found that ActionScript 3.0 will have the ability to format as well (via Macromedia Labs).

Darron’s ActionScript was more promising because I can use it now, but its a bit dated with the #include , so I decided to take a few moments and update it to a static Class.

Anyhow.. Here is my modification on Darron’s original script. The zip contains the class and a sample FLA. Kudo’s to Darron for doing all the hard work!!

Download: DateFormatter Class

[as]
import DateFormatter;
var testDate:Date = new Date();
trace(DateFormatter.formatTo(testDate, “mm/dd/yyyy”));[/as]

New beta of Yahoo Maps built with Flash

I saw this press release mentioned the new beta of Yahoo Maps. I fully expected it to be Google Maps rip-off..and at first, I thought I was right. Until I right-clicked and noticed that Yahoo Maps is actually built with Flash. Very cool!

http://maps.yahoo.com/beta/

Return top