Not that anyone reads this but just in case I've finally put my blog on my own domain.
1/31/2009
1/17/2009
Windham!
Today I went to Windham mountain for snowboarding via NYCski. It was incredibly awesome! The temperature was a blistering -15 at the base and -25 at the top of the mountain, but I was able to manage to snap one shot before my fingers couldn't feel the phone anymore :)

1/15/2009
Galleries for Thursday Jan. 15th
For those that may want a listing of the galleries that I could find that are having openings tonight. Here ya go...
"Darkrooms - Homme Made" curated by Avi Feldman at Daneyal Mahmood Gallery
W 25 street, 511, floor 3
Screening: Stacey Steers "Phantom Canyon: A film installation" at Clamp Art
W 25 street, 531
Eduardo Barcenas "Acts of Silence" at Elga Wimmer PCC
W 26 street, 526, floor 3
* Bill Abdale, Elizabeth Axtman at Marvelli Gallery
W 26 street, 526, floor 2
? "Propose: Works on Paper from the 1970s" at Alexander Gray Associates
W 26 street, 526, floor 10
Akira Ikezoe at Esso Gallery
W 26th Street, 531
Christopher Miner "Easter for the Birds" at Mitchell - Innes & Nash ((chelsea))
W 26 street, 534
Jacqueline Rush Lee "INTROspection" at Center for Book Arts
W 27 street, 28, floor 3
James Nares "Element Number One: new video" at Paul Kasmin Gallery
Tenth avenue, 293, at W 27 street
Photography: David Haxton "Color Photographs" at Priska C. Juschka Fine Art
W 27 street, 547, floor 2, 6-9pm
Rachid Ben Ali at Witzenhausen Gallery
W 27 street, 547, floor 5
Merrill Steiger "From Above" at Allen Gallery
W 27 street, 547, floor 5
10/27/2008
Pulling in mp3 library folder
So I have a client who wanted to have mp3's that the user could listen to and also download. Since I'm very against having to constantly manage a clients content I wanted him to be able to have no problem adding and removing mp3 files. Normally, one might have an xml file that the user can update but that's to prone to fail on the side of the client. So what to do...
Enter getId3. This is a super handy tool for anyone who would want to retrieve data about mp3 files via php. Granted, php isn't that fastest and I have yet to test the speed of retrieval on a large scale, but as of now it seems to be a superb way to automatically generate my listing of mp3 files along with the data attributed to them.
Here is my php file I created to give you an idea of what it can do:
require_once('../../../getid3/getid3/getid3.php');
echo "\n\n";
// include getID3() library (can be in a different directory if full path is specified)
// Initialize getID3 engine
$getID3 = new getID3;
$DirectoryToScan = '../mp3'; // change to whatever directory you want to scan
$dir = opendir($DirectoryToScan);
while (($file = readdir($dir)) !== false ) {
$FullFileName = realpath($DirectoryToScan.'/'.$file);
if (is_file($FullFileName)) {
set_time_limit(30);
$ThisFileInfo = $getID3->analyze($FullFileName);
getid3_lib::CopyTagsToComments($ThisFileInfo);
// output desired information in whatever format you want
echo "\t\n";
echo "\t\t \n";
echo "\t\t \n";
echo "\t\t \n";
echo "\t \n";
}
}
echo " \n";
And here is my result
10/23/2008
Embedding htmlText in your TextArea control
So I'm currently working on my first mxml project at work (I've done other stuff but not at work so they were much less involved).
I realized a little in to the project that using the TextArea control can be a bit of a pain the ass at times. Namely, I couldn't find a way to embed fonts that were loaded into the flash and set in a stylesheet that I set the TextArea to use.
The problem here was that the textArea component only looks for a single font attributed to it in the styleName attribute that cna be set. If it doesn't see that there's a font there it sets embedFonts = false.
So liking to have as much control over things as possible, and realizing that not being able to embed my html goodness was not acceptable, I extended the TextArea class and after some finagling managed to discover the best means for fixing this. It appeared that the UITextField within the TextArea was dispatching a textFieldStyleChange event after it did it's validation. This alowed me to add a listener to the textField and set the embedFonts attribute to whatever I chose. Here is my class:
import flash.events.Event;
import mx.controls.TextArea;
import mx.core.mx_internal;
use namespace mx_internal;
public class TextArea extends mx.controls.TextArea
{
public var embedFonts:Boolean = false;
public function TextArea()
{
super();
}
private function handleTextFieldStyleChange(event:Event):void
{
textField.embedFonts = this.embedFonts;
}
mx_internal override function createTextField(childIndex:int):void
{
super.createTextField(childIndex);
textField.addEventListener("textFieldStyleChange", handleTextFieldStyleChange)
}
}
Filed under: actionscript, adobe, coding, programming
