Answering Mike's Challenge

| 5 Comments

Did you see the challenge Mike Chambers posted for created a search engine in 4 lines of ActionScript? Well.. I've done it, and I'm pretty sure this is the best solution given thus far. Are you ready?

I'm using 2 components from the v2 framework, a Button and a TextInput. Drag them both onto the stage, name the Button "search_btn" and the TextInput "search_txt" and then add the following code to the timeline:

function click() {
	search_txt.text = "No results found for " + search_txt.text + "!";
}
search_btn.addEventListener("click", this);

Pretty slick, right? Of course, you'll never find any results no matter what you search for.. but the specification didn't say that it had to actually return useful information! What do I win? :-)

5 Comments

haha....funny...

Hey, this would run pretty fast too!

Best regards,

Note to self: Need to qualify success parameters more completely in the future.... ;-)

jd/mm

heh, the most functional script I've ever seen :D

Que bueno!
Un toque de humor sienta muy bien!
;)

Leave a comment



About this Entry

This page contains a single entry by darron published on March 1, 2004 7:54 PM.

MXDU, Sydney... farewell! was the previous entry in this blog.

Enumerated Types in ActionScript is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Archives

OpenID accepted here Learn more about OpenID
Powered by Movable Type 5.02