Browse > Home

| Subcribe via RSS

Introduction to OOP

January 27th, 2009 | No Comments | Posted in ActionScript, Tutorials

OOP: Object Oriented Programming

Object Oriented Programming is a concept rather than a technique or method of coding.  However, within the concept of OOP, there are certain techniques and methods.  Object Oriented Programming (OOP) is an object-based style of programming that uses objects to store and work with data. Templates known as classes are used to define the properties and methods that make up objects in code.  So the point of it is to easily re-use robust code, making developing applications much easier, stronger, and allows more possibilities.

In this tutorial, I will take you through a very basic and easy, but very powerful method and aspect of OOP in Flash.  We will create a loading circle that spins around by attaching external code to the movie clip.  This will hopefully demonstrate to you the power of OOP.













More »

Particle Experiment

January 21st, 2009 | No Comments | Posted in Experiments

Today someone showed me a very cool site, ThisIsSand.com - once I saw this, it reminded me of an old particle experiment I did with AS2. I converted into AS3 and played around a bit more. Click and hold to spray; use the arrow keys to adjust the pressure and spread of the particle spray. I’m still trying to figure out how to make the sand pile up on top of each other..

Compare and Contrast Duo-Image Gallery

December 2nd, 2008 | 1 Comment | Posted in Experiments

I recently asked someone close to me if they had a gallery for their work, what kind of website they would want. She said she would want a gallery where the user could compare two images at once; look at them both at the same time to compare them. I was interested and wondered how a website or application like this should be made. So I ended up creating a duo-image gallery with a drag and drop feature to view the images. Please click the preview image below to see it. :) My own photographs were used in this experiment.

Pixel Art Drawing Application (v2)

October 29th, 2008 | 2 Comments | Posted in Experiments

As promised, a new update of the pixel art drawing application is posted up here. It now has a color picker, a grid to toggle on and off, a scalable drawing area, and a clear all button. You can create some pretty nice pixel art and pixel fonts. :) I still plan to develop this a lot further. Please comment on any suggestions you might have and I would love to see anything you create using this. Please feel free to mess around with it below, take a screenshot of what you made, and send it to my email (please email me first through my website).

Pixel Art Drawing Application

October 27th, 2008 | No Comments | Posted in Experiments

Another experiment; pretty simple and basic at this stage, but I plan to implement many more features to create a kind of pixel art drawing application. I think it could be really fun, so come back some time to see more versions/updates on this! :)

Flash Tip: Casting

October 17th, 2008 | 5 Comments | Posted in ActionScript

Casting can be very useful and in some cases, necessary. AS3 has a system of strict datatyping, much like AS2, but now even more strict. Using casting, you can transform one datatype into another, so to speak. For example, if you are receiving a string in Flash, say “item07″ and you need to use the number from that string, you can extract that using String methods and then cast the string into a uint datatype or Number datatype. Here is a working example of why you would do this, in AS3 code:

var str:String = "item07";
str = str.substr(4);
str += 3;
trace(str); // this will give the result of str being 073

var str:String = "item07";
str = str.substr(4);
var res:uint = uint(str) + 3;
trace(res); // this will give the result of res being 10


The uint(str) is where casting is used. The way you cast a datatype is you wrap it in a different datatype. For example, you can use MovieClip(value), Number(value), String(value), etc. Also, sometimes in situations, I have to use casting to refer to a movie clip in the parent clip, …MovieClip(parent).myMovieClip…
I hope you found this useful, thanks.

Old mouse fun!

September 21st, 2008 | No Comments | Posted in Experiments

This is also an old one, done in AS2. There’s nothing that special about it, except maybe the curveTo method of getting the mouse wire to follow with the mouse like that. But like I said, not that special, I just find it really creative and amusing. :P

Old colorful lineTo experiment

September 19th, 2008 | No Comments | Posted in Experiments

Now this is an old one - done way back in the day of AS2. :o What is it and why did I do it? I think every great flasher has spent some time, or should!, on John’s (of RED Interactive) Self Titled portfolio site. It’s incredible and I kept wondering how that circular menu was possible.. So I started to mess around in Flash with circles, trigonometry, lineTo, etc. So here’s the little copycat version of the grand master’s design. :P

Image Blur Mask Effect

September 18th, 2008 | 3 Comments | Posted in Experiments

Just a little experiment I did with a masked blur effect on an image. Could maybe be used to create a cool menu.. Enjoy.

5 Flash Tips

September 14th, 2008 | 1 Comment | Posted in ActionScript


FPS

It is good to have a FPS (frames per second) value that is not too slow, but not too fast. The default value is 12, which is too slow. It’s too slow, because when you create animations on the timeline, it will look slow and blocky. I know many expert flashers keep it at 24 fps, which is a good speed. It is fast enough so that the animations will look smooth, but slow enough so that the user’s computer won’t lag. For example, if there are a ton of animations playing at once, the flash player might lag because it takes a lot of CPU to play. Further more if the animations are frame based and the fps value is jacked up to something like 40 or 50, it will lag a lot more. However, the great people over at Adobe are constantly working at performance, among other things, and are setting impressive milestones of increasing Flash’s performance and CPU usage. There was a major bump in performance from Flash 8 and AS2 to Flash CS3 and AS3. When using AS3, the Flash Player uses a entire new virtual engine to process the file and code, which is much better than the old versions and engine because it is much more strict and streamlined. But I always keep my FPS value at 30. As long as you keep the processing usage in mind, I advise just finding a value that you are comfortable with.

More »