Archive for August, 2004|Monthly archive page
The Delegate Class – Use It!
Just used Flash’s new Delegate Class this morning. I know some about Java, but I just recently finished a fairly complicated web site (ASP.Net / C#) so I’ve been in the mindset of creating a component, say a combo named “cboCustomer” and “cboCategory” and creating it’s event handlers as
public void cboCustomer_OnSelectedIndexChanged(EventArgs e){…}
and
public void cboCategory_OnSelectedIndexChanged(EventArgs e){…}
In the past with Flash you would have to receive the event with a listener and then examine the EventObject.target to see which element was clicked. Scope also got a bit funky here as well depending on how you assign things.
Using the Delegate class in Flash, I can create my combos “cboCustomer”, “cboCategory” and their event handlers just like in C#:
public function cboCustomer_onChange(e:Object):Void {…}
and
public function cboCategory_onChange(e:Object):Void {…}
Now, when I use addEventListener, I use the Delegate class as the subject of the event:
cboCustomer.addEventListener(”change”, Delegate.create(this, cboCustomer_onChange));
and
cboCategory.addEventListener(”change”, Delegate.create(this, cgoCategory_onChange);
Now the Delegate will automatically send the event to the proper handler depending on which control was clicked! BTW the scope will be in the surrounding class, not in the component.
Cool!
I’m Firing My Web Host, Twice
I’ve been using UplinkEarth for a couple of years now. They have everything I need and seem to be reasonable in price. I don’t check out my site too often, but it seem that lately when I do it’s down, or my email is down. And they seem to want to charge me for things like ColdFusion MX ($4.95/domain/month), SQL Server ($12/month). My total is ending up around $50/month, which I think is too much.
There are many out there – what I wanted was ASP.NET support with ColdFusion MX (incl. Flash Remoting). There’s a certain Canadian host that seems to be popular with many of the higher profile Flash folks out there. The info on the site was a bit sparse, but it was CA$12.50/month and seemed to have what I was looking for.
While things like subdomain and database setup worked fine, I was having trouble getting Flash Remoting, MovableType, ftp accounts, email client connections going. Web mail existed, but not via mail.mydomain.com – it has to be done via the (rather outdated) control panel or with an obscure ip + path. While one of these issues took a day, most others took several (email issues have not been resolved).
As of Saturday night I switched to CrystalTech. CF hosting only – I need Flash Remoting support, but I also need to have ASP.NET so I guess I’ll open up a separate account when I need it. That kind of sucks, but they have a 30 day guarantee so if necessary I can move elsewhere (HostMySite?). Sunday morning within about an hour I have my weblog up and running. I can get my mail easily with their web client. My mail client works fine now. Multiple ftp accounts are not a problem.
I feel bad that I’m going to have to dump the Canadian company, bad enough that I’m not using their name here, they are very nice and extremely hands on, but I think that their forte probably lies in Unix servers, not Windows servers. I don’t think I should have to submit a support ticket and wait for days to have basic functionality for a web domain.
AS2 Remoting Class Install Incomplete?
I decided to start messing with the new AS2 Remoting classes today, so I downloaded and ran the install from the Macromedia site. I started to code in my usual style.
I created a preload movie clip and dropped it on the stage at frame 10. I dropped the Remoting and RemotingDebug classes, the “main” movieclip described below, as well as a few other components into the preload clip. I added the usual preload code here.
I created a movieclip called main, set the linkage to a class called main.as and dropped it on the stage at frame 20.
Within my main class I have this:
import mx.core.UIObject;
import mx.controls.ComboBox;
import mx.remoting.Service;
class main extends UIObject {
var CapsService:Service;
var cboCats:ComboBox;
function main() {
}
}
This yields a class not found error for mx.remoting.Service. A look in the mx/remoting/Service directory shows no files!
A search of the groups on Google led to a link to download the as classes for AS2 Remoting. After copying these files over everything works fine.
Is the install really incomplete? Did I need to drop the remoting classes onto my “main” movieclip rather than on the _root?
Of Salad and Service (and Meat)
So I call Joyce on the way home yesterday and she says the wants to celebrate the end of one of her projects by going to Fogo de Chao. Pretty strange – she really is not much of a carnivore but she said she was paying so how can I complain?
We’ve been there several times and compared to other Churrascaria’s we’ve been to, they are without a doubt the best. (I can’t include the ones in Brasil – my first time I was so overwhelmed, I hardly remember the experience – or was it the Caipirinhas?) First off, the place ain’t cheap. Joyce had the salad bar only and that was $20. The full deal is $43. With drinks and no desert the bill came to just over $100.
Neither of us even really ate that much. I mean I got pretty full, but not stuffed. What make this place worth all that money is the service. These people are on top of it. They listen to every comment that comes from your table without you knowing it. For example, they give you sides of cooked bananas, mashed potatoes and polenta. Somehow as we started our meal we didn’t receive these. Joyce mentioned to me that she thought we should have our sides by now, and BOOM. There they were. One of the waitresses heard Joyce’s comment and rushed to get us the sides. Once my Mom mentioned that she always liked mint jelly with her lamb. BOOM. There’s the mint jelly. It’s just fun to watch the staff work the room. Nothing is ever lacking, even when there are at least 200 people in the room.
Stuff your wallet with cash and go there.
Clients and Hurricanes
So after my hellish month we decide to head to Cocoa Beach to stay at Joyce’s sister’s beach condo. Another Flash project was scheduled to wrap and my .NET project was waiting for feedback. We planned a week in advance. Thursday morning…Turns out that my Flash project was not exactly wrapping when it should have. There was also hurricane Bonnie to drive through in a MINI Cooper. We decided to go anyway. Charley was hitting the west coast so we weren’t worried about hurricane #2.
The drive was fairly rough but not too bad. It rained for maybe 4 hours with 1 hour of it very intense. On Friday morning we find out that hurricane Charley was headed right toward Tampa where Joyce’s sister lives. I headed to Kinkos (40 min one way) to handle some final changes for the new delivery date of the Flash project and then head back. Joyce’s sister, her two kids, and their three dogs are coming to stay with us to avoid the hurricane.
My client changes the onsite install of the project to Monday. I tell him I’m not due to return to work until Tuesday. Long sighs and cursing on the other end of the phone. .NET site client starts demanding changes.
So much for a vacation. We decide to come home a day early on Sunday.
The hurricane brushed us on Friday night. It was actually pretty cool – only 50 – 70 mph winds.
An Incredible IDE
Several years ago, I was involved pretty heavily with Visual Basic and ASP. I used MS Visual Studio Pro for VB, but I always used Homesite for ASP stuff.
After putting it off for a couple of years I finally decided to jump into ASP.NET to create a database driven shopping cart site. I upgraded my Visual Studio license to the 2003 version and I was on my way.
I must say that developing with this IDE is a dream. The code hinting is amazing, even showing the properties, methods, etc of my own custom classes. If only the Flash IDE could approach this!
My only complaint is that the DataGrid component does not support (as far as I can tell) hierarchical/relational data.
Miserable July
Last month was extremely difficult. At the time that I took on a website project (my first using ASP.NET), another project (my first all Flash CD) that had been delayed raised it’s head. Unfortunately both were due at the same time with very unreasonable deadlines. I literally worked from 5 or 6 in the morning until 9 or 10 at night for three weeks, including the weekends.
In my experience, deadlines always slip, so I wasn’t concerned at first, but when both clients held fast I was completely screwed. Especially since each project was a first for me. I can NEVER let this happen again. This combined with the fact that I ran out of money at this time made me so miserable that it’s gotten me thinking of an entirely different line of work.
On a positive note, I’ve recently helped my friends at Fury New Media XML enable a Flash site that allows the client, a local video post house, to easily update video (FLV) and news clips on their site.
I’ve also completed a Flash site for Dentition, but since my design skills are lacking, a redesign is under way enlisting the help of Chris Hays.
Gerling Tour Pics
Rockin’ Aussies Gerling have wrapped up their first US tour. There are some genuinely hilarious pictures on their tour blog at http://www.gerling.net.au/badblog.html.
Leave a Comment
Comments(4)
Comments(6)


