Thursday, January 25, 2007

Assignment: Coding Off and Commenting....

this is great... the spacebar is LAAAAAME!

this is the code for some loader script thingamabobber...

//animate progress bar
function updateProgress() {

//switch statement changes display based upon the value of 'phase' passed to it,
//so that user can see the rate of completion. The 'label' attribute is the
//text that is displayed on the progressbar.
switch (phase) {
case 1:
progressbar1.label = "Phase 1: Creating Characters ";
progressbar1.setProgress(1, 5); // 1 out of 5 steps complete
break;
case 2:
progressbar1.label = "Phase 2: Creating Cities ";
progressbar1.setProgress(2, 5);// 2 out of 5 steps complete
break;
case 3:
progressbar1.label = "Phase 3: Creating Trees ";
progressbar1.setProgress(3, 5);//3 out of 5 steps complete
break;
case 4:
progressbar1.label = "Phase 4: Completing Generation ";
progressbar1.setProgress(4, 5);//4 out of 5 steps complete
break;
case 5:
progressbar1.label = "Phase 5: Compressing ";
progressbar1.setProgress(5, 5);//all 5 steps complete
break;
default:
//clears the setInterval calls to updateProgressBar
clearInterval(id);
progressbar1.setVisible(false);

//the loader1 movieclip runs "behind the scenes", waiting for the
//updateProgress function to finish; then we know that all
//the info has been downloaded successfully and we can proceed
//to load the image into the loader1 mc.
loader1.addEventListener("updateProgress", this);

//locate the image to load
loader1.contentPath = "balloons.jpg";

break;
}
phase++; //progress to the next phase
}

//this is called with the progressbar component as the instance,
//to allow us to tailor its look-n-feel
function setStyles(instance) {
instance.setStyle("color", "white");
instance.setStyle("fontFamily", "Arial");
instance.setStyle("fontSize", 14);
instance.setStyle("fontStyle", "italic");
instance.setStyle("textIndent", 10);
}

//show the progressbar running
function startExample(showIndeterminate:Boolean) {
if (showIndeterminate) {
phase = 6;

//call updateProgress() every 12000 milliseconds
id = setInterval(updateProgress, 12000);
progressbar1.indeterminate = true;
progressbar1.label = "";
} else {
phase = 1;

//call updateProgress() every 2000 milliseconds
id = setInterval(updateProgress, 2000);
progressbar1.label = "Initializing ";
}
}


//set the parameters and styling of the progress bar
progressbar1.mode = "manual";
progressbar1.labelPlacement = "top";
progressbar1.setSize(300,30); //resize
progressbar1.move(150,210); //relocate
setStyles(progressbar1); //finally apply the styles

//initiate the progress bar at phase 1
startExample(false);

Tuesday, January 23, 2007

"It's Not Gay, It's Masterbation!"

That's what I think of flash right now.

It's Tuesday, and I'm in my first class of the day.... something called introduction to print or something or other... I've been here from about 8.20ish....

This blog is for flash class or something of that sort.

I do not like blogger.

I do not fully support blogger.

I've been using LiveJournal for umpteen years.

But I dont post religeiously.

And I've spelt that wrong.

I'm going to go off and not care now.