New Printer! Canon ip1880

I’ve got a new printer! It’s brand new, but I bought it off the hands of a member on the VR-Zone forums. Seems like he got it free after buying a PC or laptop during Comex.

The good thing about this printer compared to my Epson All-in-one is, that you can still print even if one of the cartridges is dry!

The other good thing is that it looks really slick! Here’s a picture:
null

This picture doesn’t do it enough justice, it’s sleek shiny and reflective. =P Anyway, I didn’t test the colour print quality as I’m using this mainly for notes - like the first thing I printed, the cheatsheets I mentioned earlier.

Here’re some tips of maintaining your printer which I found out after my Epson died.

Tip 1:
Never put your printer directly under an airconditioning unit. The print head will be clogged with the ink, after the low temperatures make the ink solid. That’s a rough description of what happens. And if a print head is gone, it’s really pointless to send your printer for repair because it’s the most costly part in the printer.

Tip 2:
Try to print something every 2 weeks. Same reason as above. It will let the ink in the print head flow instead of being stuck in it. By printing every once in a while, you ensure that the ink in the print head always changes.

Hope these 2 tips will give your printer a longer life! Adios.

Actionscript 3.0 Basics: The Moving Ball

I always thought the Moving Ball lesson my Flash lecturer gave was a very good and important lesson which provided me with the fundamentals and understanding of how things worked in Flash, particularly the onEnterFrame.

Now in AS3.0, onEnterFrame no longer exists. Events replaced everything, including this convenient function which I had come to love and hate in the past year I’ve used Flash.

This is what a general onEnterFrame looks like in AS2.0:

[code lang="actionscript"]
ball_mc.onEnterFrame = function(){
this._x += 5
}
[/code]

The above code will move the MovieClip right at a rate of 5 pixels per frame. Hence, if your movie FPS is 12, it will move 60pixels to the right per second. That’s pretty choppy. This is also why a high FPS will give you smoother animations if you didn’t know already. But I’ll leave that for a proper tutorial another time. Now, on with the Moving Ball tutorial.

The Ball I’m talking about is simply a circle shape converted as a MovieClip if you didn’t know that. We’re going to experiment a lot of stuff with this “ball” of ours in future tutorials to come, so choose a good colour to create it with.

After creating this movieclip, give it an instance name of “ball_mc”.

Here is what the AS3 code will look like to do what the same thing above:

[code lang="actionscript"]
function moveBall(e:Event):void {
ball_mc.x += 5;
}
ball_mc.addEventListener(Event.ENTER_FRAME,moveBall);
[/code]

As you can see it’s pretty similar to the code that we used for the button tutorial. The big difference and key thing to note here is the eventType. I’m using a Event.Enter_Frame here instead of a MouseEvent.MOUSE_UP. If you’re good, it means that you know that Event.Enter_Frame is what is actually the new onEnterFrame.

That about wraps up this tutorial for now. I will extend this tutorial to include the good old “delete this.onEnterFrame” function in AS3.0 soon.

Actionscript 3.0 difference

Did you know that there’s a big change in terms of how properties are called in AS3 now?

For example, in AS 1 and 2 we used to call MovieClip._x but now in AS3 it’s just MovieClip.x. No more underscore. I just knew about it while exploring AS3 and proceeded to google for a cheat sheet. Guess what? There really was one!

Download it here: http://www.actionscriptcheatsheet.com/downloads/as3cs_migration.pdf

The properties I mentioned are in page 2 of the pdf. I took it that flash.display.DisplayObject simple means a Movieclip object or a Button object or whatever it is that is on the stage.

I hope this is another stepping stone into AS3.0 for everyone.

First step into AS3.0

This is my first step into Actionscript 3.0. I thought I would share it with everyone and at the same time, try to do a very simple thing so that I won’t be daunted by the new language.

What I am going to do:
Create a button that - after being clicked on, will give a dynamic text field a new value.

Firstly, create a new Actionscript 3.0 document and then just draw any object, and convert it into a Button(F8). Give this button an instance name of “button_btn”.

Next, create a new text field, set the type to “Dynamic Text” in the properties panel, and give it an instance name of “output_txt”.

Now before I go on to show you the Actionscript 3.0 code, I’ll show you what the code should be like, should it be in Actionscript 2.0. This code will not work in this newly created AS3.0 document.

Actionscript 2.0 Code:
This is what it will look like it is still AS2.0:
[code lang="actionscript"]
button_btn.onRelease = function(){
output_txt.text = “Button was clicked!”;
}
[/code]

Now the AS3 Code:

Actionscript 3.0 Code:
[code lang="actionscript"]
function eventResponse(evt:MouseEvent):void {
output_txt.text = “Button was clicked!”;
}
button_btn.addEventListener(MouseEvent.MOUSE_UP,eventResponse);
[/code]

As you can see, there’s an extra line of code, and a whole bunch of even nonsense. Worry not, the Flash help documentation provided a pretty detailed explaination to get you started to events. I’m going to quote from the documentation since it’s quite well written:

Basic event handling
The technique for specifying certain actions that should be performed in response to particular events is known as event handling. When you are writing ActionScript code to perform event handling, there are three important elements you’ll want to identify:

The event source: Which object is the one the event is going to happen to? For instance, which button will be clicked, or which Loader object is loading the image? The event source is also known as the event target, because it’s the object where the event is targeted by Flash Player (where the event actually happens).

The event:
What is the thing that is going to happen, the thing that you want to respond to? This is important to identify, because many objects trigger several events.

The response: What step(s) do you want performed when the event happens?
Any time you write ActionScript code to handle events, it will include these three elements, and the code will follow this basic structure (elements in bold are placeholders you’d fill in for your specific case):

[code lang="actionscript"]
function eventResponse(eventObject:EventType):void
{
// Actions performed in response to the event go here.
}

eventSource.addEventListener(EventType.EVENT_NAME, eventResponse);
[/code]

To summarise, eventSource, is the target MovieClip or Button that you want to add the event to. In our example, it was a button with the instance name button_btn.

eventType is what the user will do to the button. In our case, it was after we clicked the button, which in flash terms is a MOUSE_UP MouseEvent.

eventResponse is the function that will be executed after the event is being done, which in relation to our example means after the button is clicked on, the function eventResponse is called. And in this function, output_txt is assigned a new value.

This is a really basic of basic introduction to Flash Actionscript 3.0 and I hope it will help anyone who’s trying to start learning it a kickstart. Keep sharing!

Here’s the source file to the above example:
Source File: Requires Flash CS3 of course!

PSD Tutorial

I saw this on Digg today and I thought it was a pretty good tutorial.

Those beautiful lines of motion we often see in Motion Graphics or the beautiful lines in the background of the nice postcard you get in Far East shops can now be done by you!

Check it out here.

The problem with the tutorial though, is that I think it only works with the colours the author gave. I’m sure if I picked my own colours, it will turn out a lot worse, since I suck at colour theory. If there is a bunch of colour palettes to go with this tutorial, then it will be perfect.

And my little project is on the backfoot a little due to a freelance job I got recently. In my current situation, I’m taking any freelance job I can. :P

Kiasu(scared to lose) me

Here I am showing why I’m a Singaporean:

http://forums.vr-zone.com/showthread.php?p=4220416#post4220416
http://forums.hardwarezone.com/showthread.php?p=25596022#post25596022
http://sg.auctions.yahoo.com/sg/i::235206933
http://www.phing.com/post.php?ad=72536

Let’s see which of these 4 places will get me the best deal. lol. I don’t have high hopes for VR-Zone since there are so many people with much better gear there. =P

More Flash tutorials coming your way

I’m working on a big project for some time now, and I’m now switching up a gear to make sure I finish this project of mine.

Expect some Flash tutorials and freebies in a totally new site soon!

Nothing to post about

There’s nothing to post about since I’m literally doing nothing all day. My freelance has a NDA so I can’t talk about it. I play C&C at night.

Ah, how about telling you guys about my new table? =D

As they say, a picture says a thousand words, so here’s a thousand word. ( Can use this excuse for your essays in future, lol)

dsc00414.JPG

dsc00418.JPG

For dynTween users

A pretty good page for people who uses dynTween or who wants to learn how to use dynTween.

http://www.pvbinduction.com/projects/bor5265/classes/dynTweenClass.as

After using it for a project recently though, I won’t touch it again, because it is very outdated. It lacks tweens for a lot of properties like color and the Flash 8 filters.

The callbacks aren’t very well structured in that they don’t have a scope, and you have to rely on _root. to get to the scope that you want.

For now, I would stick to Fusekit or MC_Tween2.

Comex 2007 LCD Monitors Brochures

Shopping for a LCD Monitor at Comex? Avoid the crowd and take a look at these brochures I scanned and uploaded. LOL. I know, doing this is so geeeeek. That’s what my brother told me when he saw me scanning. =P

http://www.designfission.com/comex2007