Dear Teachers

April 23rd, 2009

I just read a wonderful post by Stacey (@bitchwhocodes)
Link: http://bit.ly/9248m

Great read Stacey, I almost fully agree. I was at Seneca College studying Digital Media just last summer, and when i look back It’s easy to see that the majority of what I learned within the realm of Media was self taught.

Students can hope for somebody like yourself to be able to direct them on the right path or shed some light when Google hasn’t given them a straight answer. This sadly isn’t the case for all College’s and wasn’t the case for me, as so, here is an open letter to my teachers from last year, and to all teachers.

Dear Teachers,

I think the saying “Those who can’t do, teach.” is valid to a good number of you, even If you refuse to believe this is the case. As crazy as it may sound, It seems like it has somehow become a standard that you will probably have an instructor (or a handful of instructors) each semester, teaching you material that they themselves do not know.

Most teachers would have considered me a horrible student. I barely attended class, I didn’t always complete my assignments, and when i was there I was reading blogs about ‘Absolute Nothing’ or ‘Real Random Numbers’ rather than paying attention. I admit it, I didn’t care a whole lot for some classes, and I know that showed because I never tried to hide it, for that I apologize. Part truth is that certain things just weren’t interesting to me and I decided my time was better spend elsewhere.

The rest of that truth lies within the fact that i (without any prior knowledge of Php) was able to complete all the assignments for our Php class within a period of two hours on the final day of school. The fact that despite my love for Flash and ActionScript, I skipped an entire semester of a class teaching Flash and ActionScript deciding I would learn more listening to Lee Brimelow in the library. To be honest I could probably continue for a while, but a lot of these problems can’t always be attributed to bad Teachers.

College education caters to the masses, and the masses as it seems aren’t all that interested in learning, or maybe they just weren’t when I was in College.
We all enjoyed College Life; we knocked back a few beers between classes, played some pool, stressed over homework that was due the next day, so I can understand what keeps students there. The underlying issue here is that most students stayed in school because they loved the college environment and drifted through classes, only taking in what they were taught, and to be honest It’s as Stacey said, they would be lucky if they retained even 20%.

So what am I still talking about? Well I’m hoping to impart some advice on what makes a good teacher, from the opinion of somebody that wasn’t one of the masses, somebody that went to school to learn. These words of wisdom are simply the things that have made the good teachers stand out through out my college eduction.

1) You are granted a tremendous power by teaching, a power to influence somebody’s life for better or worse. Use this power wisely, I’ve seen people drop out of school because teachers have suggested it.

2) Please don’t teach to bring home rent, teach because you want to make a difference, and let the money come as way of you trying to make that difference. You will never have the same impact in a job you don’t wake up in the morning excited to do. We see it when you don’t want to be there and as a result we don’t want to be there either.

3) Id rather you not hold our hands and walk with us through the door, instead show us where the doors are and the interested amongst us will walk through them ourselves, chances are the uninterested students will have forgotten where the door was by the time they walked through it anyway.

4) I’ll make this one specific so it’s easier to voice, but it applies in any field. Don’t spend the entire 14 weeks in a semester trying to drill Actionscript into us, as with any language, If we don’t speak it on a day to day basis were going to forget. Rather than trying to teach as much of any subject as possible, show us where we can go to find information ourselves, the people we should know, the events we should be going to and the blogs we should be reading.

5) Please don’t act like your better than us. Some teachers make it a point to show you how awesome they are some will laugh at the idea that a student may know more than they. I’ve had all kinds of teachers, but I will forever remember the ones who put themselves on the same level as us, not only teaching us but learning from us as well.

Sometimes I look back and I’m utterly appauled by some of the people we had as teachers, Microsoft Sam reading the web tutorial version of what you were teaching would have been more informative. That being said going to College was one of the best decisions I could have made, and I have a handful of teachers to thank for all the times they inspired us to be more than we were.

Thanks for reading, hope It made a difference,

-Raz

Twitter / RazPeel

Flash As3 Event.MOUSE_LEAVE Not Firing.

March 8th, 2009

Really quick post this time. Wanted to share some recent found knowledge that i wish i had known twenty minutes prior to testing functionality in an RIA earlier on tonight.

1
stage.addEventListener(Event.MOUSE_LEAVE, exitHandler);

This will not work in the Flash IDE! The embedded player just never fires the event.
The only work around i could find is to publish the swf and view it in a browser.

Twitter / RazPeel

As3 CData Binding

March 4th, 2009

I just manged to get some code working that has had me banging my head against the wall for the last couple of hours.
The goal was simple, send XHTML markup to PHP. Horray says me, should be fairly straight forward!
I’ll just pop a <!CDATA[..]]>> tag around the nodes that store the markup so the tags will not be parsed.
Then i set off about my usual workflow, and soon enough, i have some actionscript which should be both reading and writing to my .xml file.

Everything looks great, time to test it out!

Problem!

1
2
3
4
5
6
7
8
9
10
// Wraps a single content node with required tags.
// Note tag = "Name" & contents = "Raz Peel"
function stringToNode (tag:String, contents:String):XML
{
    return new XML (
            <{tag}>
                +"<![CDATA["+{contents}+"]]>"+
            </{tag}>
        );
}

My first element comes out as such.

<Name>
+ "
<![CDATA[" + {contents} + "]]>
" +
</Name>

Obviously this is not working at all as it should, i take it my XML isn’t formatted correctly.
Back into code I rewrite my function to the follows:

1
2
3
4
5
return new XML (
            <{tag}>
                <![CDATA[ {contents} ]]>
            </{tag}
            );

This result was better, but still very much incorrect.

<Name><![CDATA[ {contents} ]]></Name>

The contents variable was being parsed as a string rather than a variable.
I jumped back into the code to try something else.

1
2
3
4
5
return new XML (
            <{tag}>
                {"<![CDATA["}{contents}{"]]>"}
            </{tag}>
            );

This must work right? Apparantly not, result was:

<Name>&lt;![CDATA[ Raz Peel ]]&gt;</Name>

This is the point where i consulted the Adobe LiveDocs
and then our Essential ActionScript 3.0 book.
Colin, unfortunatley, confirmed that i wasn’t doing anything wrong, weird! Ten minutes on google found me on Jesse Warden’s blog reading this post.
As such i changed my code to this:

1
2
3
4
5
6
7
8
function cdata(theURL:String):XML
{
    return new XML ("<![CDATA[" + theURL + "]]>");
}

return new XML (
            <{tag}>{cdata(contents)}</{tag}>
            );

Result?

<Name><![CDATA[Raz Peel]]></Name>

Yay, success!!!
I’ve no idea if this is suppose to work like this or not, but it does.
Thanks for sharing Jesse!

Twitter / RazPeel

Simple Rotating Images (As3)

February 14th, 2009

In the last week of talking in various channels, at least a few people have asked for help with the code to dynamically rotate several images in a loop.


Get Adobe Flash player

I’ll show you two different ways you can do this, both leading to the same result. You can look at the method i would use, (which includes the use of Tweener, and another way using Flash’s built in tween system.

If you want to follow along using my method, i have a pre-prepared file that you can start with at this link.
The images used in this tutorial are not my own, rather by one of my favorite digital artists Greg Martin.


1) My way, using Tweener
.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 // import Tweener
import caurina.transitions.Tweener;

// imageNum will hold the current image we are viewing,
// imgArray will store a list of all the images in use
var imageNum:int = 0;
var imgArray:Array = new Array();

/* create a for loop construct to iterate through all the display objects on the stage
the code that loops takes each display object and stores it in our imgArray,
and then changes the alpha value of each one to zero so nothing is visible on screen */

for (var i:int = 0; < this.numChildren; i++) {
imgArray.push (this.getChildAt(i));
imgArray[i].alpha = 0;
}

// create a function called tweenImg. You can then call this function whenever we want the image to change
function tweenImg () :void {
var secondNum:int = 0; //define a variable to hold the index of the next image to be shown

//tell Tweener to create a new tween which will wait 1.5 seconds and then set the alpha property of the current image to 0.
Tweener.addTween(imgArray[imageNum], {delay: 2, alpha: 0, time: 1, transition:"easeOutCubic"});

//check if the current image is the last one in the list. If so, reset the index to 0, otherwise increase the index by 1.
//tells the next image to fade in
imageNum >= imgArray.length - 1 ? imageNum = 0 : secondNum = ++imageNum;
Tweener.addTween(imgArray[secondNum], {delay:2, alpha: 1, time: 1, transition:"easeOutCubic", onComplete:tweenImg});
}

// start the loop cycle by fading in the first image and calling the tweenImg function when it’s finished.
Tweener.addTween(imgArray[0], {alpha: 1, time: 1, onComplete:tweenImg});

That’s all! You now have a series of images that all fade in and then out continuously. Finished files are available at this link.

2) The other way, using the bulit in tweening engine.

I wrote the alternative way of achieving the same result using flash’s own inferior tweening system.
I’m not going to post it here though, instead you’ll find the complete working files for this method, along with the one previously discussed at this link.

Good luck!

Twitter / RazPeel

I Need More Time!

February 12th, 2009

I recently came to terms with the fact that a good portfolio costs a lot to build. Not really something I though much about while in was in school. I knew it would take a good amount of time, but I had never put a price tag on that time until recently. So this is what it comes down to; I cannot afford to build my own portfolio, at least not for the moment! I hope this won’t always be the case, but as time passes I find myself with less and less time to spare.

Is it me or does anyone else find it very ironic that by the time you can afford the time to build an amazing portfolio you probably won’t need it as much? Here’s a pictures for now, it’s the next best thing! :D

Raz Peel: Contact Information

Email: raz@wizardelraz.com Web: http://wizardelraz.com Twitter: @RazPeel Twitter / RazPeel

Sms Notifications for Visa

August 20th, 2008

PNC, SunTrust, U.S, Wachovia, Wells Fargo, RBC, and TD (to name a few) are testing real-time SMS notifications whenever your card is activated. From what it looks like there are various filters you may opt to use, such as ‘above $ amount’ or ‘include cash withdrawals’.
Setting aside the extortionate text messaging rates within Canada, sounds like a pretty fantastic idea. Then again, I would hate to be in a supermarket and hear the Motorola text messaging sound 7000 times as people pay for groceries.
I hope they have the brains to throw real time Email notifications in the mix as an alternative, sounds a lot less irritating. Great idea overall though.

Hello Kitty Credit Card

Twitter / RazPeel
About

Name: Raz Peel

Raz Peel 2009

Employer: Sapient
Occupation: Web Developer
Contact: raz@wizardelraz.com