2/25/2005
ActionScript Poetry contest is on! // or, trace (contest[poetry].annual[0]);
In the time-honored tradition of Perl poetry contests, we're introducing the first-of-its-kind (that we know of, anyway) ActionScript Poetry Contest.
The rules are simple: Translate your favorite poem (any poem, but remember: "Nantucket" is not an accepted ActionScript keyword), and post it here in the comments section of this article before March 21 (which is UNESCO's official World Poetry Day (Who knew?)). Once the deadline has passed, the judging wil begin.
Judging will be based on several factors, including public reaction to the poem (as noted in comments here), its poetic appeal, creativity and the ungodly whims of our nameles, faceless panel of judges. Extra credit will no doubt be given if the "poem" actually does something in ActionScript.
Keep in mind, this is not a call for Flash interpretations of literary works (See Vidlit.com for that sort of thing), but a real, honest-to-goodness, geek-fest in which the code itself becomes the poetry. (See the ActionScript Jabberwocky for an example of what we're looking for.)
As for prizes: What would a geek contest be without the almost-obligatory grand-prize of a free iPod up for grabs? Well, it would be a Turdhead contest. How about a free T-shirt?
Let the games begin:
NOTE:The submission window is closed now. Judging shall now commence.



”The Raven” - Edgar Allen Poe (first verse)
http://www.comnet.ca/~forrest/raven.html
var midnight = new Object();
for(var j=1; j < 2; j++) {
midnight.dreary = true;
}
var i = new Object();
var topic = ”forgotten lore”;
while(pondered) {
i.weakAndWeary(topic);
}
i.weakAndWeary = function(topic) {
trace(topic);
}
while(nodded) {
i.napStatus = 0.9;
suddenTapping(”chamber door”);
}
suddenTapping = function(target) {
trace(”tap tap on ”+target);
}
visitor = new Object();
visitor.prototype.tapping = suddenTapping;
this += null;
OK, here’s the first few lines of Coleridge’s Kubla Khan (http://etext.lib.virginia.edu/stc/Coleridge/poems/Kubla_Khan.html). All I have time for tonight:
var xanadu = _root.attachMovie(”Xanadu”,”Xanadu_mc”,1);
var dome = xanadu.attachMovie(”PleasureDome”,”dome_mc”,1);
dome.setStatus(”stately”);
KublaKhan.decree(dome);
var alph = xanadu.attachMovie(”SacredRiver”,”Alph_mc”,2);
alph.run();
var c = xanadu.attachMovie(”Caverns”,”caverns_mc”,3);
c._width = Number.POSITIVE_INFINITY;
var sea = c.attachMovie(”Sea”,”sea_mc”,1);
sea._visibility = false;
var ground = xanadu.attachMovie(”Ground”,”ground_mc”,10);
ground._width = 2 * 5;
ground.fertility = true;
// El Dorado
// Edgar Allan Poe
// http://www.mat.upm.es/~jcm/poe–shadow.html
// ========================
var elDorado = new Object();
var knight = new Object();
knight.bedight = ’gaily’;
if( sunshine && shadow ) {
knight.gallant = true;
}
while( knight.journeyed > knight._x + 1000) {
knight.singing[’song’] = true;
knight.search( elDorado );
}
while( ground.spot != elDorado ) {
knight.grow(age++);
knight.bold = true;
createEmptyMovieClip(’shadow_mc’, 1000);
knight.heart.setMask(shadow_mc);
}
if( length ) knight.strength = false;
shadow = new Object();
shadow.pilgrim = true;
knight.meet(shadow);
knight.query(shadow, elDorado.land[where]);
shade = shadow;
knight.search = knight.seek;
shade.reply = function() {
if( knight.seek = elDorado ) {
knight.ride = function() {
moon.mountains._y++;
shadow.valley._y–;
}
}
}
Another gem from me:
/*
I can’t remember the author of this ”poem,”
but I do remember reading it in an Uncle John’s Bathroom Reader
(I forget which volume!)
*/
var speaker = new Object();
speaker.hasMother = false;
speaker.hasFather = false;
speaker.bornWith[skin] = false;
for( var i = 0; i < Math.POSITIVE_INFINITY; i++ ) {
if( i == 0 ) {
speaker.enterWorld();
speaker.speak = true;
} else {
speaker.speak = false;
}
}
It’s a riddle, the original text of which looks like this:
Motherless and fatherless,
Born without a skin:
I spoke when I came into the world
And never spoke again.
The answer? A fart.
[…] nbsp; [ ]
Сегодня на сайте Флэш Потрошителя появился интересный пост о конкурсе Actionscript-поэзии. Не очень понял правила, но пример, присланный неким Болговым Романом в рассы […]
// Story Of Love in ActionScript.
// Rassoha Victor
this.storyOfLove = function (){
var live = random (2);
if (live == false) return;
var love = ’only for you’;
if (love) fscommand (’live’, true);
var heart = live and length(love);
if (heart) me = new Array ();
if (heart == false) this.stop()
else _level0.play();
while (heart += 1){
me.push (’one more beautiful day’);
if (not random (1000)) break;
}
var memory = love;
}
// thank you. :)
/*
Fire and Ice a poem by Robert Frost
Some say the world will end in fire,
Some say in ice.
From what I’ve tasted of desire
I hold with those who favour fire.
But if it had to perish twice,
I think I know enough of hate
To say that for destruction ice
Is also great
And would suffice.
I made it a functioning script, but you can delete the
poet object, function and call as well as the reply calls
and uncomment the ”Some.say (how);”
*/
Poet = new Object ();
Poet.contemplating = function () {
_root.createTextField (”output_txt”, 5, 0, 0, 300, 100);
output_txt.variable = ”reply”;
output_txt.border = true;
output_txt.background = true;
output_txt.multiline = true;
reply = ”Listening…”;
_root.createTextField (”input_txt”, 10, 0, 125, 300, 20);
input_txt.variable = ”how”;
input_txt.type = ”input”;
input_txt.border = true;
input_txt.background = true;
input_txt.multiline = false;
how = ”Will the world end by fire or ice?”;
input_txt.onSetFocus = function () {
input_txt.text = ”";
};
//
Reply = new Object ();
Reply.onKeyUp = function () {
if (Key.getCode () == Key.ENTER) {
Some.say (how);
}
};
Key.addListener (Reply);
};
Some = new Object ();
I = new Object ();
perished = 0;
Some.say = function (worldsEnd) {
perished++;
I.desire = I.tasted (worldsEnd);
if (I.desire != false) {
I.hold = Some.favour (worldsEnd);
reply = ”I hold ” + I.hold + ” with those who favor ” + worldsEnd + ”.”;
} else {
significance = I.checkSignificance (worldsEnd);
isSufficient = I.checkSufficience (worldsEnd);
reply = ”Destruction by ” + worldsEnd + ” is ” + significance + ” and the sufficiency is ” + isSufficient + ”.”;
}
if (perished == 2) {
I.know < = hate;
reply = ”‘Tis too much.”;
}
};
I.checkSignificance = function (worldsEnd) {
if (worldsEnd == ”ice”) {
return ”great”;
}
};
I.checkSufficience = function (worldsEnd) {
if (worldsEnd == ”ice”) {
return true;
}
};
I.tasted = function (worldsEnd) {
if (worldsEnd == ”fire”) {
return true;
} else {
return false;
}
};
Some.favour = function (favour) {
if (favour == ”fire”) {
return true;
}
};
//Some.say (how);
Poet.contemplating ();
Total rip-off of some lame something or other:
var roses = new Color();
var violets = new Color();
roses.setRGB(0xFF0000);
violets.setRGB(0×0000FF);
_global.I = new Object();
_global.ur = new Object();
I.amIn = function() {
ur.base = true;
I.killin = function() {
ur.d00dz = true;
}
Okay, so it’s not even a real poem. My heart is a cold, dark place.
I did this a little differently. I setup the code to write the original poem to a text field on the stage. Here ’tis …
/*
* Running this code produces the original poem.
*/
var author:String = ”Robert Hoekman, Jr.”;
var going:String = ”Down the street,”;
var direction:String = ”south”;
var _amGoingWhere:String = ”going ” + direction + ” …”;
var day:Object;
var air:Object;
var greensAndReds:Object;
// day obj
day = new Object();
day.dayName = ”Sunday”;
day.timeOfDay = ”6am”;
// air obj
air = new Object();
air.describe = function(str){
var density:String;
var temperature:String;
var description:String;
if (str == ”thickAndCold”) {
density = ”thick”;
temperature = ”cold”;
description = ”the ”+density+”, ”+temperature+” air”;
}
return description;
}
// greensAndReds obj
greensAndReds = new Object();
greensAndReds._areLinedUp = true;
// Hide allButStreetlights
allButStreetlights._visible = false;
//
function createHeaderInfo() {
var poemTitle:String = ’”‘ + day.dayName + ” at ” + day.timeOfDay + ’”‘;
var poemAuthor:String = ”Robert Hoekman, Jr.”;
var poemInfo:String = poemTitle + ” by ” + poemAuthor + ”n”;
return poemInfo;
}
function handleAir() {
_airDoesWhat = ”settles ”;
_settlesHow = ”in a haze ”;
return _airDoesWhat + _settlesHow + ”so that” + ”n”;
}
function getVisible(){
var temp:String = ”you can only see” + ”n”;
if(allButStreetlights._visible != true){
temp += ”the streetlights.” + ”nn”;
}
return temp;
}
function checkGreensAndReds(){
if (greensAndReds._areLinedUp == true){
return ”Greens and reds lined up” + ”n” + ”in a” + ”n” + ”row.”;
}
}
// Render poem
function renderPoem() {
_root.createTextField(”poem”, 1, 20, 20, 400, 400);
poem.text = createHeaderInfo();
poem.text += ”======================================”+”nn”;
poem.text += day.dayName+” at ”+day.timeOfDay+”.”+”nn”;
poem.text += going+”n”+_amGoingWhere+”n”;
poem.text += air.describe(”thickAndCold”) + ”n”;
poem.text += handleAir();
poem.text += getVisible();
poem.text += checkGreensAndReds() + ”nn”;
poem.text += ”======================================”;
}
renderPoem();
/*
Funeral Blues by W.H. Auden
AKA the poem in Four Weddings and a Funeral
Stop all the clocks, cut off the telephone,
Prevent the dog from barking with a juicy bone,
Silence the pianos and with muffled drum
Bring out the coffin, let the mourners come.
Let aeroplanes circle moaning overhead
Scribbling on the sky the message He Is Dead,
Put CrГЄpe bows round the white necks of the public doves,
Let the traffic policemen wear black cotton gloves.
He was my North, my South, my East and West,
My working week and my Sunday rest,
My noon, my midnight, my talk, my Song;
I thought that love would last for ever: I was wrong.
The stars are not wanted now; put out every one;
Pack up the moon and dismantle the sun;
Pour away the ocean and seep up the wood;
For nothing now can ever come to any good.
*/
// Stop all the clocks, cut off the telephone,
for (var i=0; i<10; i++) {
this[”clock”+i].stop();
}
telephone.cutOff();
// Prevent the dog from barking with a juicy bone,
this.attachMovie(”BoneSymbol”,”bone”,1);
bone.setStyleProperty(”taste”,”juicy”);
bone._x = dog._x;
bone._y = dog._y;
barking = new Sound(dog);
barking.setVolume(0);
// Silence the pianos and with muffled drum
var snd;
for (i=0; i<10; i++) {
snd = new Sound(this[”piano”+i]);
snd.setVolume(0);
}
this.attachMovie(”DrumSymbol”,”drum”,2);
drum.setStyleProperty(”sound”,”muffled”);
// Bring out the coffin, let the mourners come.
this.attachMovie(”CoffinSymbol”,”coffin”,3);
for (i=0; i<20; i++) {
this.attachMovie(”MournerSymbol”,”mourner”+i,i+10);
}
// Let aeroplanes circle moaning overhead
// Scribbling on the sky the message He Is Dead,
var a,txt;
var tft = new TextFormat();
tft.font = ”Skywriter”;
tft.size = 36;
tft.textColor = 0xFFFFFF;
for (i=0; i<10; i++) {
a = this.attachMovie(”AeroplaneSymbol”,”aeroplane”+i,i+1000);
snd = new Sound(a);
snd.setVolume(100);
txt = a.createTextField(”scribble”,0,a._width,a._height,500,50);
txt.setTextFormat(tft);
txt.text = ”He Is Dead”;
}
// Put CrГЄpe bows round the white necks of the public doves,
for (i=0; i<20; i++) {
this[”publicDove”+i].neck.attachMovie(”CrepeBowSymbol”,”bow”,0);
}
// Let the traffic policemen wear black cotton gloves.
var glove;
for (i=0; i<20; i++) {
glove = this[”trafficPoliceman”+i].leftHand.attachMovie(”GloveSymbol”,”glove”,0);
glove.setStyleProperty(”background”,0×000000);
glove.setStyleProperty(”fabric”,”cotton”);
glove = this[”trafficPoliceman”+i].rightHand.attachMovie(”GloveSymbol”,”glove”,0);
glove.setStyleProperty(”background”,0×000000);
glove.setStyleProperty(”fabric”,”cotton”);
}
// He was my North, my South, my East and West,
my.North = my.South = my.East = my.West = Him;
// My working week and my Sunday rest,
my.workingWeek = my.SundayRest = Him;
// My noon, my midnight, my talk, my Song;
my.noon = my.midnight = my.talk = my.Song = Him;
// I thought that love would last for ever: I was wrong.
my.correctness = ( love == Number.POSITIVE_INFINITY );
trace(my.correctness); // returns false
// The stars are not wanted now; put out every one;
for (i=0; i<1000; i++) {
this[”star”+i].removeMovieClip();
}
// Pack up the moon and dismantle the sun;
moon.removeMovieClip();
sun.removeMovieClip();
// Pour away the ocean and seep up the wood;
ocean.water.removeMovieClip();
wood.seep();
// For nothing now can ever come to any good.
good = 0;
/*
A Haiku I once heard - run for full effect
*/
var syllables = [
”wri”, ”ting”, ”a ”, ”po”, ”em”,
”in ”, ”se”, ”ven”, ”teen”, ”syll”, ”a”, ”bles”,
”is”, ”ve”, ”ry”, ”dif”, ”fi”, ”cult”
];
for (var i = 0; i < 17; i++)
trace(syllables[i]);
A wonderful poem about cryonics.
That is not dead which can eternal lie
and with strange aeons, even death
may die
// Class That
class com.bayinteractive.That {
private var _canEternalLie:Boolean;
private var _dead:Boolean;
public function That () {
_canEternalLie = testLongevity();
}
public function get canEternalLie():Boolean {
return _canEternalLie;
}
public function set dead(isDead:Boolean):Void {
_dead = isDead;
}
private function testLongevity ():Boolean {
var infinity = true;
while (infinity) {
if (!lying){
return false;
}
}
return true;
}
}
// Class Aeon
class com.bayinteractive.Aeon {
private var _isStrange:Boolean;
public function Aeon(strange) {
_isStrange = strange;
}
public function get strange ():Boolean {
return _isStrange;
}
}
//_root timeline code
import com.bayinteractive.That;
import com.bayinteractive.Aeon;
var death:Object = {_certain:undefined};
Object.prototype.die = function () {
delete this;
}
var aeons:Array = new Array();
var infinity:Boolean = true;
while (infinity) {
var strange = (Math.random() <= 0.5);
var tmpAeon = new Aeon(strange);
aeons.push (tmpAeon);
}
var myThat:That = new That();
if (myThat.canEternalLie) {
myThat.dead = false;
}
for (var i = 0; i++ < aeons.length) {
if (aeons[i].typeof(Strange)) {
var mayDie = (Math.random() <= 0.5);
if (mayDie) {
death.die();
}
}
}