http://www.blog.noponies.com/archives/80
From the site:
This is a simple ActionScript 3 implementation of the class marching ants selection marquee you find in applications such as Photoshop.
The class is based off this ActionScript 2 example here; http://www.nocircleno.com/experiments/selection_ants_proof/index.html, but adds in many more methods and is entirely self contained. Drawing the bitmaps for the marquee internally in the class.
Features:
Either Fixed or user drawn marquee
Draggable or static fixed marque
Programatically changeable marquee colours
Programatically changeable marquee line thickness
Does not rely on library assets for marquee
Update:
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication layout="vertical"
xmlns:mx="http://www.adobe.com/2006/mxml"
applicationComplete="init()">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.remoting.mxml.RemoteObject;
private function init():void
{
//
}
private function resultHandler(e:ResultEvent):void
{
log.text = e.result.toString() + "\n" + log.text;
}
private function faultHandler(e:FaultEvent):void
{
Alert.show(e.fault.message);
}
private function sendMessage():void
{
// call CFC method with arguments
ro.echo(msg.text);
msg.text = "";
}
]]>
</mx:Script>
<mx:RemoteObject id="ro"
destination="ColdFusion"
endpoint="http://127.0.0.1/flex2gateway/"
source="AirRemoting.BlazeDSCFCTest3"
result="resultHandler(event)"
fault="faultHandler(event)" />
<mx:HBox>
<mx:TextInput id="msg" />
<mx:Button label="send" click="sendMessage()" />
</mx:HBox>
<mx:TextArea id="log" width="200" height="200" />
</mx:WindowedApplication>
package
{
import flash.events.Event;
public class StockEvent extends Event
{
public static const FETCH_COMPLETE:String = "complete";
public static const ERROR:String = "error";
private var _data:Object;
function StockEvent( type:String, data:Object = null )
{
super( type );
_data = data;
}
public function get data():Object { return _data; }
}
}
Okay, excellent - the only caveat is that on the main blog page, the entire page needs to load before the formatting is applied. This won't really affect a post page, but the consolidated page may be a little slower in rendering it's code content.
So the <br/> tags should be fixed now, as I had to previously set those myself every time I wanted carriage returns in ANY post (to ensure code display was formatted properly). Now that there is a method in SyntaxHighlighter (I stumbled onto this fact by accident), I can retain my auto-inserted returns without it blowing out my code blocks for display.
A good Thursday morning already.
I live in Boston, but I'm not really a Red Sox fan... I love the Pittsburgh Pirates. Hey, it's near where I grew up, my Grandfather loved them, so do I. They haven't had a winning season in forever, but I love them anyway.Anyway, I've been hearing about Manny being Manny for years now and couldn't believe all the excuses I would hear talk radio come up with, as well as local fans.
Tonight, after the Red Sox were pwned completely by the Angels for the third game in a row (another sweep), Manny ditched the park early, getting out as quick as he could. His last game in Boston? Who knows.
Before the game Manny was interviewed:
"The Red Sox did the same with guys like Nomar Garciaparra and Pedro Martinez, and now they do the same with me. Their goal is to paint me as the bad guy," Ramirez added. "I love Boston fans, but the Red Sox don't deserve me. I'm not talking about money. Mental peace has no price, and I don't have peace here."Okay. Now, how I would LOVE to see this play out: Boston can't pull the trigger on a trade. I mean, honestly, this would be a difficult trade even if Manny were a man.
But imagine that after all of this, Manny is stuck here in a place he's bad-mouthed and whined about, after getting paid $20M a year. Boston puts up with all his shit, why in the world would he want to get out of Boston?
Maybe he'll start pushing more elderly members of the staff, or take three straight strikes at every at bat, take games off on a whim, or sit in the dugout and count his $20M gross, or whatever.
"How often do you copy and paste URLs from your news reader or browser into your IM or Twitter client in order to share stories with friends? Probably too much. That's why we built Apprise.Apprise isn't about just reading all your news on one place; it's also about sharing your news all in one place. With built-in AIM and Twitter support, all you have to do is click on a article to start it cascading through your social network.
We made a conscious effort to make Apprise feature-rich, but still very easy to use. See what you think:
- AIM Integration. Just click on a story, and choose which of your buddies to send it to.
- Twitter Integration. Post URLs to Twitter right from Apprise.
- Drag and drop. Easily drag and drop (or copy and paste) articles to share them via email.
- Site View. View an article's summary, or switch over to Site View to see the entire webpage in the integrated browser. If you're browsing and find a site that provides a feed, you can easily click to add it to Apprise.
- Automatic feed resolution. Rather than tracking down and entering a feed URL, just put in the site's normal URL and Apprise will automatically find and aggregate its feed.
- Vi keys! (Emacs support pending.)
- Realtime search across all feeds.
- OPML import and export.
- Folders. Organize your feeds any way you want.
- Automatic categorization by author and topic.
- Completely cross-plaftorm, thanks to Adobe AIR. (Linux support still in alpha.)
I have been watching local Red Sox games lately and I've noticed for a while now that pitchers are wearing those thick, stiff necklaces. I wondered what was going on, was this some kind of fashion statement amongst fellow players? A cry for attention by ditching the gold chains for some manly synthetic rope? No, it's Phiten wear.Turns out this stuff is supposed to improve the efficiency of cells. Nylon soaked in titanium. Stabilizing the flow of electricity throughout the body. Improving the alignment of ions.
Horseshit. Some look nice, but come on.
Ball players (and golfers, etc.) are superstitious and would buy and wear silk threads soaked in cat piss if they thought it might give them some bizarre edge. Or putting on their left shoe first. Or eating octopus with a three-tined fork standing up with their backs to a mirror.
These $29 - $40 Phiten bracelets and necklaces are nothing more than a placebo with some interesting coating material. I mean, hey, they look kind of cool. At least some of them do.
I wouldn't mind spending that for something that I would like to wear because it has the Pittsburgh Pirates logo on it, but I can't be sucked in by pseudo-science on the grounds that it will make my body work any better.

The Instruments tool that Apple ships with XCode, Interface Builder, etc. is simply amazing.
Leave some new marks on the internets.
This February I lost my Dziadzia and I couldn't attend the funeral as the birth of my second child Amy was imminent. It tore me up, but I know I did the right thing in staying home. During the funeral, I took a walk near Callahan State Park to feel closer to him since I couldn't be there.
We always took walks in the woods together when I was growing up. That day there was a huge collection of crows (a murder of crows) at the top of a hill - which was unique. I felt like he was there in some way.
Today driving home from work, something pulled me off the road, and caused me to take to the same path in the woods - up to the same spot. I don't know why, but I just did it. I had my HD camcorder with me at the same time.
When I arrived at the same spot, I turned to my left and about five feet from my head was an enormous owl... probably two-feet tall. It didn't move, it just watched me and even moved a little closer as I stood there admiring it. I took some photographs and some HD (1080) video.
It could be some crazy coincidence but I don't think so. I believe that my Dziadzia decided to visit me today and for that I am ultimately thankful. I miss you Dziadzia, but it was wonderful to feel just a little bit closer.
How to experience this bug (OS X 10.5.4, iTunes:7.7 (43)):
Launch the latest AMP. Launch iTunes & change it's window to the mini-player. Position the iTunes window vertically below the AMP window, like so:

Giving AMP focus, try clicking down on the controls for iTunes... namely the Pause/Play toggle button. The button will show it's state change but the event doesn't seem to be properly fired from within iTunes. iTunes ignores the request. Repeatedly.

I found this set of AS3 Webservices classes and it's a pretty nice implementation. Above is a screen shot of a quick example I whipped up that utilizes the classes. I am not using a .swc or installed components, rather using the classes themselves in a document class.
This site just screams of OOP in the development (it would have to otherwise it would be a complete nightmare to maintain I'd imagine).
private function updateTiming( e:Event ):voidThat stage.focus = stage; seems pretty weird to me, but it works to maintain focus on the stage in order to properly accept keyboard events.
{
var n:Number = Number( e.currentTarget.selectedItem.data );
Sheet.MINIMUM_CHANGE = n;
stage.focus = stage;
}
German:
CREATE OR DIE: Mario, mal angenommen, dass jemand noch nichts von dir gehört hat: Stell dich doch bitte kurz selbst vor.
Mario: Guten Tag, mein Name ist Mario Klingemann und ich mache schöne Sachen aus Code. Auf meiner Visitenkarte steht "Computational Artisan", was man auf deutsch wohl am ehesten mit "Rechenkunsthandwerker" übersetzen könnte (aber das lassen wir mal lieber). Das Problem ist, dass mir "Künstler" zu affektiert und "Programmierer" zu normal ist, aber irgendwo dazwischen bin ich zu finden. Ich bin einer von den Jungs, die mit Lego, Fischertechnik und einem C64 aufgewachsen sind und irgendwann den Absprung verpasst haben.
English:
CREATE OR DIE: Mario, sometimes assumed that someone did not you heard: suppose you please briefly but themselves.
Mario: Good day, my name is Mario Klingemann and I do beautiful things in code. On my business card, "Computational Artisan," what is in German most likely with "computing craftsmen" could translate (but the times we prefer). The problem is that I am "artists" and drawling "programmer" to normal, but I'm somewhere in between to find. I am one of those guys, with Lego, fishing technique and C64 grew up and eventually missed the takeoff.
- MobileMe is really spotty already. And has been. I've been able to use some features, but dependability is really random. Sometimes I'll be using email online on my desktop and it will then just redirect to the mobileme page on Apple's website. Grrr. Okay.
- Activations around the world have been plagued by crashing activation servers. AT&T servers are going down, but also the iTunes servers.
- The iPhone 2.0 update for the Touch is nowhere to be found yet, even though the link has been up on Apple's site the whole day already.


PCalc for the iPhone. This is a pretty sweet calculator you might consider picking up. John Gruber seems to love this too. I always have a little calculator next to my keyboard, but this is way better.

Roll over the advert block, and out spins a cool navigation scheme over top of the regular page contents. Normally I don't like Flash ads unless they are well-done. I'd chalk this one up to really well done.

I spotted this on a cycling (probably Flash) display on a Bank of America ATM.
Looks like the iPhone is the epitome of having a mobile browser. Nice choice.
Hmm, the page you’re looking for can’t be found.
Did you try searching? Enter a keyword(s) in the search field above. Or, try one of the links below.
Cya .Mac. I can't wait to see what you've turned into tomorrow morning. Thanks for all the fun we've had together over the years. I hope that you turn into something closer to what that yearly fee warrants.

Last night I downloaded the new free Cold Storage map from Live Marketplace. I ran around for a little while by myself on it, and it's a nice map for smaller teams. There is a lot of decent detail in the geometry and extra eye candy spread around the map. The Halo 3 engine looks wicked dated now when you compare it to COD4, GTA4, etc. but it's still decent enough for some fun.
I played a few games on it via the special playlist for the map, and if you look at the image above, this is where EVERYONE ends up dancing and killing one another. It's almost like there is a magnet in there for whatever reason. I feel kind of bad for Bungie as they put a lot of work into this, and everyone just runs into this "box" to get it on.
I'll be on again tonight. gamerTag: edolecki
- I don't think Framingham, MA even has 3G service available. In fact from what I can tell, Boston itself is covered, but many outlying areas are not. So what would be the point right now.
- Those stores are going to be madhouses... and if it really is in-store activation only, that's going to be 10-20 minutes of nervous energy waiting to be able to get that sweet hardware out of the store. Too much stress for me. Let the initial tidal wave subside first.
- I am currently a Verizon customer and I love their service. My wife has them too, and it makes it really easy having one bill, etc. I wish Verizon networks could support the iPhone but it's not even close to being able to play nice with the iPhone yet.
- The original iPhone is still attractive since it will get the App Store. I don't really need GPS (it would be a nice gimmick), and not sure I need to buy music while on the go. We'll get Exchange support, Mobile Me, etc. So I wonder if I even need the extras the 3G iPhone has to offer.
- I could always change my mind at the last minute and pull the trigger ;)
The Preppy Handbook.Because of some grade school and high school reunion activity I started remembering a bunch of stuff from those amazing times... and I had forgotten all about this classic book. I basically lived a lot of the contents of this mighty tome for over eight years... from mid-way through grade school all the way through prep school.
I misplaced the dog-eared copy I had so I am replacing it with a new copy. I can't wait until it arrives. Oh, and I married a Townie ;)
.Mac (soon to me .Me) Syncing Problems Resolved.
For whatever reason, my work Mac could sync everything except my .Mac calendars. I was getting inconsistent data errors. Instead of going crazy, I launched iSync (I had almost forgotten that application even existed), and I reset my sync data.
Then through .Mac preferences, I re-synced my data & wouldn't you know it? My iCal calendars are syncing again. I gave up on trying to resolve this problem a while ago and was hoping it would just fix itself. I gave this a go and was pleasantly suprised.
Just in time for some iPhone 3G/.Me Mc'lovin!
Fireworks Around Boston.
For whatever reason, a lot of towns aren't having fireworks displays this year. The closest place for us is to go to Lincoln (where in Lincoln I have NO idea). Are these towns (Wellesley, Natick, Framingham, etc.) so strapped for cash they can't afford fireworks? Going downtown is madness... best to watch those on television. I had to get to Fenway Park a few weeks ago around lunch, and it took me about 35 minutes to travel 4 blocks on the way. With kids, this is simply untenable.
Jaromir Jagr peanut butter| gc | () | method |
public static function gc():void| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 9.0.115.0 |
Forces the garbage collection process.
For the Flash Player debugger version and AIR applications only. In an AIR application, the System.gc() method is only enabled in content running in the AIR Debug Launcher (ADL) or, in an installed applcation, in content in the application security sandbox.
As it turns out, my problem with corrupted messages (tracking down this bug has shown sometimes I am getting two messages combined into one, sometimes an empty message, etc.) I got rid of Arthropod and the data coming in is still sometimes corrupted.
A theory now after lots of debugging is that somehow a Dell AMD machine is spitting out badness to my socket. Intel PCs don't seem to have this problem when running the same application on their hardware.
So right now instead of simply consuming the raw message and passing it up an event chain, it's going to have to be parsed on receipt. If it's in a form I am currently looking for, the event will fire. If I get garbage after the message is received, I throw out anything out of scope. I am also going to look for multiple carriage returns and snap those out as well.
I suppose it's good form to parse the messages coming in and ensuring that the event sends valid data. I was getting NaN for certain things which doesn't make a whole lot of sense... unless there is garbage in there when it's being translated to a Number (for instance).
So this proves that something that runs great on one hardware platform can wonk out on another. I don't know what AMD and Dell have to do with one another (I used straight serial and also a USB to serial adapter - and both provided some bad socket data). So I can only think at the moment that something in a AMD Dell isn't reliable when using a socket... to describe the whole set up and the bug would take a lot of effort... but so far this AMD Dell is the only machine to showcase the bad behavior.
All this work tracking this down shouldn't be in vain. I've spent the better part of a day testing my classes, the input hardware, multiple PCs, versions of the player, etc. It's all come down to one box providing wonky data.
Now you know that it might not be your code that is faulty, but the way the hardware is interpretting and passing data along. I am no hardware engineer, but I'm starting to feel a little like an apprentice.
This project should have been a no-brainer. But it's taight me something. Always vaidate your input data, even when you think it's a no-brainer. It might cost you some extra work, but in the end you'll be more comfortable knowing that you've accounted for the rarest case of getting poor data input. Even for a keyboard event listener? Sure, why not.








