Friday, September 18, 2009

Estée Lauder win

Update September 25 Turns out Estée won in the "Beauty and Cosmetics" category at the OMMA Awards a few days ago! This thing is a monster.

I've found out the site I worked on, Estée Lauder, has won;

two WebAward awards (Outstanding Website, Best Fashion Website)
one Internet Advertising Award (Outstanding Achievement In Internet Advertising)

It's also an entry at Cannes! (Cosmetics, Beauty & Toiletries)

More after the jump;


Managing a team of five Flash developers and co-ordinating remotely with the New York office was a true test of my managerial abilities. The site went down to the wire, but in all, I was really pleased with the efforts of my team. Todd Fraser and Stephan Tanguay, especially.

Not to mention, it was my very first AS3 project. I've learned a ton since then in implementing AS3, but I cut my teeth with this project. My favourite self-built classes, TextFormatter and MainImporter were first coded for Estée Lauder. I owe Organic, a debt of thanks for being able to work on this project.

My focus, beyond management, was the Skin Care Diagnostic Tool




Honestly, what better way to start the day than to find out work you've done won awards?

In case I forget, FOTB, here I come!

Labels: , , , , ,

Tuesday, January 06, 2009

Aspect Ratio

I've been working on a little something and wanted to maintain a 16:9 aspect ratio no matter what size the browser window was.

Essentially, the calculation is this;
multiplier = 16/9 = 1.7777778

In my test, I used the multiplier on the stageHeight and stageWidth to find out

private function maintainAspectRatio(event:Event):void
{
   width16x9 = stage.stageHeight*multiplier16x9
   height16x9 = stage.stageWidth/multiplier16x9
   if(width16x9 < stage.stageWidth){
      height16x9 = width16x9/multiplier16x9;
   }else{
      width16x9 = height16x9*multiplier16x9;
   }
}


So using an EventListener on the stage I can monitor the current stage size.

stage.addEventListener(Event.RESIZE, maintainAspectRatio);

And there you go.

Here's the test.

Labels: , ,

Friday, November 07, 2008

Text Selection Discovery

I was wracking my brain on and off for about a week trying to get a field to select all the text in it when it achieves focus. This happens automatically when you tab to it, but when you click in it, it sets the caret wherever you're clicked.

Initially I was convinced that FocusEvent.FOCUS_IN should do the trick. In fact, I'm still convinced it is, but it doesn't work.

var tmp:TextField = new TextField();
tmp.addEventListener(FocusEvent.FOCUS_IN,focusText);
tmp.htmlText = "test text";
tmp.autoSize = "left";
tmp.selectable = true;
tmp.type = "input";
tmp.border = true;
tmp.x = 50;
tmp.y = 50;
addChild(tmp);
function focusText(_fevt:FocusEvent):void{
trace(_fevt.target.text);
var tf:TextField = TextField(_fevt.target);
tf.setSelection(0,tf.length);
}

This doesn't work. Such a shame.

Anyway, Todd Fraser over here at Organic gave me one of those, "wait, MouseEvent.CLICK didn't work?" with one eyebrow raised. And although I had to admit I hadn't even bothered with MouseEvent.CLICK because I assumed FocusEvent.FOCUS_IN should work. Don't discount what you might consider "ol' timey" ways of doing things.

var tmp:TextField = new TextField();
tmp.addEventListener(MouseEvent.CLICK,focusText);
tmp.htmlText = "test text";
tmp.autoSize = "left";
tmp.selectable = true;
tmp.type = "input";
tmp.border = true;
tmp.x = 50;
tmp.y = 50;
addChild(tmp);
function focusText(_fevt:MouseEvent):void{
trace(_fevt.target.text);
var tf:TextField = TextField(_fevt.target);
tf.setSelection(0,tf.length);
}

Shoot, dawg.

Labels: , ,