Monday, June 02, 2008

Happy June

Things are busy as usual and that means not posting. That's not to say I'm not doing anything and just to prove it...

I ran into a problem in a recent project where I had a series of buttons and I wanted to one to be active right off the bat. ie, like a gallery where the first image is the triggered from the first thumbnail.

There are two ways I found;

1. When your button isn't actually sending any information along with it you can change your callback function to accept a null parameter.

ex.
button.addEventListener(MouseEvent.CLICK, onClick);

private function onClick(mevt:MouseEvent=null):void
{
//do whatever here
}

now I can just call the onClick function like any regular ol' function

onClick();

However, if you want to actually click the button because you need to know something that button has;

//using the same code as above

button.dispatchEvent(new MouseEvent(MouseEvent.CLICK));

TADA!

Now tell me I haven't been doing anything.

Labels: , ,

Monday, July 09, 2007

Personal Pet Peeve

This may not bother you, but when I have one of my let's surf blogs moments, I get so perturbed by spelling mistakes. It's understandable that someone may have missed something, but for the love of Pete, read your post before you publish. Take a few minutes. I read a couple of posts on one blog and was mentally tsk tsk tsking, when one post was titled What do you do with a BA in English?. I was shocked. Every post has/had at least three spelling and/or grammatical errors. How can you possibly have a degree in a language of which you have so little mastery?

Then I clicked one of her links to another blog of one of her friends. The title of her entire blog had drownding in it. DROWNDING???? Have none of your friends advised you that's an error? Haven't you noticed yourself? Criminy*.

I don't claim to possess flawless spelling or grammar and I make my own mistakes, but I do try and read my posts over so I can avoid irritating myself. Or irritating others.

*I'm working on reclaiming ol' timey words and phrases. Things like criminy, gosh, good golly and my personal fave Jeez louise. I'm also a fan of saying Easy peasy, lemon squeezy

Labels: , ,