04-11-2003, 12:57 PM
|
#1
|
|
ActionScript.org Founder
Join Date: Nov 2000
Location: New York
Posts: 8,736
|
Just for Kicks Challenge 1
OK so this is what I'm thinking. I look at our site and notice that while the forums are active, submissions to competitions, and in fact, submissions general seem to be pretty low compared to other similar sites in the Flash field and, in fact, similar sized community sites in general. That's a bit disappointing as it leaves most of the content creation down to the regulars, but that's another story.
Since the forums are the most active area of the site, I've decided to start a bit of a thing here and see if it takes off. My idea is this: how about we run a competition, or perhaps we should just call it a challenge, for which ActionScript.org offers no prize. Further, Strok and I won't be the judges; you guys will. So basically you're just entering for kicks and to show your stuff. Now for that reason, the task at hand can't be anything too complicated, so as to not take too much time out of your day. At the same time the script generated should be useful in some practical sense.
So here's my idea for the first Just for Kicks Challenge:
In 25 lines or less (stolen from Bit-101's competition) create something which enhances the coolness, usability, appearance, intuitiveness of a Flash MX TextField. Comments don't count as lines. The line limit is for construction of your feature only: code which demonstrates it in action doesn't count. Standard "what is a line" rules apply. Entries should be code only I think, but I guess we could allow some visual elements too. Fancy animation won't win it for you though.
Submit your code via this thread. Entries will close in 14 days from today. If this one takes off we can run them more frequently. If people think this particular challenge is stupid but the idea is good, say so and suggest some other idea for the challenge; that's literally just what came to mind while I was writing this thread.
If this one takes off, then we can run these heaps more often. I'll enter tomorrow or later in the week when I have a chance to code something. Since I'm not going to judge the winner I think I should be allowed to enter this one
__________________
Cheers
Jesse Stratford
ActionScript.org Cofounder
Please don't email or PM me Flash questions, that's what the Forums are for!
Please don't rely on me reading my PMs either. Email me about important stuff.
Last edited by Jesse; 04-11-2003 at 01:33 PM.
|
|
|
04-11-2003, 01:48 PM
|
#2
|
|
ActionScript.org Founder
Join Date: Nov 2000
Location: New York
Posts: 8,736
|
I hate to be the one to respond to my own thread, but I got carried away with this idea and thought of an idea for my entry. So here it is:
In IE (4+...?)when you're filling in forms online, if the field has the same name as a field you've filled in previously, and autocomplete is enabled, it gives you a list of values you've previously used. This system sort of replicates that in a very basic way. Really what it does is store values entered into fields based on the name of the field, in a SharedObject, then, on request, it populates the field with a value from the SharedObject should one exist. At present the function must be invoked manually but you could set it up such that as soon as the field gets the cursor focus it checks the SO for the last value and populates it. The code is as follows:
ActionScript Code:
TextField.prototype.recordPastValues = function() {
if (!_global.fieldList) {
_global.fieldList = new Array();
}
_global.fieldList.push(this);
this.onKillFocus = function(newFocus) {
trace("Recording value: "+this.text);
_global.pastValues_so.data[this._name] = this.text;
_global.pastValues_so.flush();
};
};
TextField.prototype.populateFromPastValues = function() {
_global.pastValues_so = SharedObject.getLocal("pastValues");
if (_global.pastValues_so.data[this._name] != undefined) {
this.text = _global.pastValues_so.data[this._name];
}
};
_global.pastValues_so = SharedObject.getLocal("pastValues");
Here's some code which impliments it. Create the buttons manually as I hate coding buttons:
ActionScript Code:
// Show it in action (lines below here don't count)
// Create a new input field
_root.createTextField("someField_txt", 1, 20, 20, 200, 20);
someField_txt.type = "input";
// Enter a value in the field
someField_txt.text = "cars";
// Register values in SO (assumes enabled, bad bad boy)
someField_txt.recordPastValues();
// Setup these two buttons in your FLA
// Chage the text field value
but1_btn.onRelease = function() {
someField_txt.text = "dog";
};
// Retrieve last value from SO
but2_btn.onRelease = function() {
someField_txt.populateFromPastValues();
};
__________________
Cheers
Jesse Stratford
ActionScript.org Cofounder
Please don't email or PM me Flash questions, that's what the Forums are for!
Please don't rely on me reading my PMs either. Email me about important stuff.
|
|
|
04-11-2003, 02:20 PM
|
#3
|
|
indeed
Join Date: Aug 2002
Location: Olen, Belgium
Posts: 2,058
|
Hi Jesse,
I've never even used textfields for anything more than to show a variable or put text in it, so don't expect any fancy coding from me.
I really like the idea though, but what I think will be 'most' attractive for new users is to be as creative as possible with 'standard coding'...
robin
|
|
|
04-11-2003, 03:36 PM
|
#4
|
|
Simon
Join Date: Mar 2002
Location: _UK.London.Bucks
Posts: 339
|
Cool idea Jesse - I've seen these kind of open competitions on other forum sites and always thought that that was something that was missing from actionscript.org.
I'll have a good think about it over the weekend and if I come up with something I'll post it up.
Really hope this takes off though
__________________
"That could be anybody's ass" - Mayor Quimby
|
|
|
04-11-2003, 04:18 PM
|
#5
|
|
Oops I did it again
Join Date: Oct 2001
Location: Melbourne
Posts: 8,579
|
here's a little one
hit the up and down arrows on your keyboard
cheers
|
|
|
04-11-2003, 04:27 PM
|
#6
|
|
Senior Member
Join Date: Aug 2002
Location: Philly
Posts: 2,583
|
linchx...sh0w us some of that expensive talent.
Jesse great idea. I can try to do some stuff for fun. Won't be the best *gauranteed--and no refunds*
O..you should have created a *.fla file for us like BillyT
So...will you be making some kind of voting poll in this thread when the comp. is over?
__________________
I need a new signature!
|
|
|
04-11-2003, 04:34 PM
|
#7
|
|
indeed
Join Date: Aug 2002
Location: Olen, Belgium
Posts: 2,058
|
hi boyz...
the expensive part was me being your friend,
now the flash part, I'll throw it in for free, because what you can do yourself, you can do better, in other words:
If I were capable to create something with textboxes, it wouldn't be new.
But I do have an idea: A while ago there was someone here and he asked how to create 'refrigerator magnets' and someone made it for him(or her, sorry bluegel  ).
think that'd look nice
robin
|
|
|
04-11-2003, 06:24 PM
|
#8
|
|
Master of Nothing
Join Date: Dec 2002
Location: San Diego, CA
Posts: 2,468
|
Question,
The whole thing including implementation should be under 25 lines, no?
Billy, yours is 27, I am sure by moving things around you could take it up under 25 though.
Jesse you are at 28 without comments.
So are we sticking to the 25 line limit?
|
|
|
04-11-2003, 06:28 PM
|
#9
|
|
Allez les Bleus!!!
Join Date: Oct 2002
Location: Paname
Posts: 2,493
|
I don't want to ruin the party or anything, but TextField are not very inspiring. I understand you're trying to get something usable and not just good-looking, but extending the TextField prototype isn't very sexy. Bit's contest was
My 2 Eurocents, thank you very much.
pom
|
|
|
04-11-2003, 06:32 PM
|
#10
|
|
Master of Nothing
Join Date: Dec 2002
Location: San Diego, CA
Posts: 2,468
|
Sorry I didn't read the instruuctions and I now realize that implementation does not count in line count, however it should, its too easy the way it is now.
|
|
|
| Thread Tools |
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT. The time now is 05:01 PM.
///
|
|