Recent Articles

GreenSock TweenMax/TweenLite was there for me when I did ActionScript development. Now that Flash is almost dead GreenSock TweenMax/TweenLite JS is there for me doing JavaScript development. I am doing more and more JavaScript and I want to create nice JavaScript documents for my code but I am having a hard time finding a nice [...]

continue reading »

In this tutorial I will show you how to Precompile JavaScript Underscore Templates with GruntJS. I will be using the GruntJS JST Plugin. Grunt JS Setup If you have never used GruntJS before you will need to checkout my Install Grunt JS on a Mac Tutorial or Install Grunt JS on Windows Tutorial. Now download [...]

continue reading »

TypeScript is a typed superset of JavaScript that compiles to plain JavaScript which primarily provides static typing, classes and interfaces. Basically you are writing JavaScript with a few conventions that helps you writing cleaner code which will compile into normal JavaScript. One of the big benefits is to enable IDEs to provide code completion, spotting [...]

continue reading »

I just started looking at EaselJS “A Javascript library that makes working with the HTML5 Canvas element easy”. I am a be fan of GreenSock’s tweening and easing library so I wanted to see how I could get TweenLite working with EaselJS. In this JavaScript tutorial I will show a very simple example how you [...]

continue reading »

In this tutorial I will show you how to compile sass files into a single css file. The technique is great for working in teams where others may not have an EDI that supports compiling sass files. Install Ruby and Sass First thing we need to is get Ruby and Sass installed on our computer. [...]

continue reading »

Google and CodeSchool announced a new course that helps people use Chrome Developer Tools. There appears to be a lot of great video tutorials for beginners and intermediate users of the Developer Tools. Here are the links to check it out: Chrome Developer Tools Video Tutorials http://discover-devtools.codeschool.com Google Blog Post http://blog.chromium.org/2013/03/discover-chrome-devtools-our-new.html Discover DevTools Companion Extention [...]

continue reading »

Before you install Grunt.js you will need to have node.js installed. For this tutorial I have node.js v0.10.0 installed. I will be installing Grunt.js v0.4.1. WARNING if you have Grunt.j 0.3.x or less you will need to uninstall it first. Grunt’s command line interface (CLI) To get grunt.js installed we need to first install Grunt’s [...]

continue reading »

Before you install Grunt.js you will need to have node.js installed. For this tutorial I have node.js v0.10.0 installed. I will be installing Grunt.js v0.4.1. WARNING if you have Grunt.j 0.3.x or less you will need to uninstall it first. Grunt’s command line interface (CLI) To get grunt.js installed we need to first install Grunt’s [...]

continue reading »

I am working on a BulkLoader class to load different types of files and wanted to use the Singleton pattern for it. This way I can load files from my main application class and retrieve the loaded files easily from other classes. Below is a simple example how you can make a score manager for [...]

continue reading »

In this TypeScript tutorial I will be going over the different compiler commands. This tutorial is not complete. Maybe someone can help finish the stuff that is missing. For the examples, lets say our TypeScript file is named “Main.ts”. Print this message To find the list of commands for TypeScript you can type the following [...]

continue reading »

In this TypeScript tutorial I will be going over TypeScript Getters and Setters which are called TypeScript Accessor. To get TypeScript Accessor’s working we need to let the compiler know we want to export the code as ECMAScript 5 compliant. Below is the TypeScript command: Below you will notice that there are two methods named [...]

continue reading »

So I’ve playing around with the TypeScript Arrow Function Expression. In this TypeScript tutorial I will show you a couple of examples using Arrow Functions. Below you will see some normal JavaScript where we create an Image Object. We pass in an anonymous function to be called by the Image Object’s “onload” event but we [...]

continue reading »

Another cool thing about TypeScript is the use of default parameters right in the function parameters. Take a look below and see how easy it is. I added them to the addPerson Method/Function but you can also added it to your class constructor. You can see default parameters in the constructor in my other TypeScript [...]

continue reading »

More and more I play around with TypeScript I think it is the best way to do JavaScript development for large and small projects. One thing I’ve noticed is some people are not aware of how easy it is to compile all your referenced .ts files into one JavaScript .js file. I am not sure [...]

continue reading »

What are …rest parameters? …rest parameters are an identifier that represents the name of the array of arguments passed in to the function. The parameter does not need to be called rest; it can have any name that is not a keyword. You can specify the data type of the … (rest) parameter as any[] [...]

continue reading »

I am going to talk about JavaScript Namespacing with TypeScript’s Internal Modules and show an example how you can use namespacing with your TypeScript applications. If you are new to TypeScript check out my OOP TypeScript Tutorial. First off JavaScript namespacing is a way of preventing issues or properties being overriden on the browser window [...]

continue reading »

In this TypeScript tutorial I will show you how to create a Ambient Declarations file for a popular JavaScript library. There is a few ways to create ambient declarations. Two that I know of are a Ambient Interface Declaration and a Ambient Class Declaration. Ambient Interface Declaration I just created one for GreenSock’s TweenMax, TweenLite, [...]

continue reading »

I love GreenSock’s tweening library for ActionScript and when I found out he converted it to JavaScript I was super pumped. I’ve been playing around with TypeScript and I created a TypeScript Ambient Declarations Class for the GreenSock JavaScript library. Now I can start using TweenMax, TweenLite, TimelineLite, TimelineMax and not get any compiling errors. [...]

continue reading »

How to make a HTML5 Canvas Banner Ad I got a new project where a client wanted an HTML5 Banner Ad that needed to be under 100k and must be done with HTML5 Canvas. Below is not the banner ad I create for the client just a simple example. I decided to create my own [...]

continue reading »

UPDATE Looks like PhpStorm and WebStorm 6.0 will have TypeScript support in it. PhpStorm & WebStorm 6.0 Early Access Program I have to say I love PhpStorm as a IDE. The code intelligence is awesome but it currently does not support TypeScript. The best I can do is get PhpStorm to recognize *.tc file extension [...]

continue reading »

I was excited when I heard about TypeScript because I love typed variables, interfaces, calling super in your methods and extending classes without all the mess of JavaScript’s native prototype. I know there is a lot of haters already of TypeScript and I haven’t made up my mind yet if TypeScript is awesome or not. [...]

continue reading »

Here is a short tutorial on how I got TypeScript running on my Mac. First thing is to install nodejs. Also get the TypeScript code if you haven’t got it already at typescriptlang.org. Go through the installment for nodejs. Next we want to open our Terminal window and get nodejs running on our mac. To [...]

continue reading »

At first I couldn’t think of how to apply smoothing to OSMF’s MediaElement when using the MediaFactory. One day later it hit me and I wanted to share. First thing you need to do is the check if the MediaElement is a VideoElement. Once we know it is a VideoElement we can let the compiler [...]

continue reading »

Just a quick note to myself. When adding the OSMF.swc to a project delete the OSMF.swc from the Flex SDK (using SDK 4.1) If adding the classes inside the project instead of using the swc you need to set Additional compiler arguemnts: -locale en_US -define CONFIG::FLASH_10_1 true -define CONFIG::LOGGING false -define CONFIG::DEBUG false

continue reading »

I’ve been searching for hours trying to figure out how to install Adobe Air applications on Android Emulator. I found a good simple article and would like to share. Check it out: Insall AIR on Android Emulator

continue reading »

This is a basic semantic structure of HTML5. HTML5 HTML5 CSS

continue reading »

You can set selectedIndex to 0 and it will just reset the combo box to the first selectable item in the list… However if you define the prompt property, then setting selectedIndex to zero won’t get you what you want. instead do this and it will be just like when you first started:

continue reading »

Here is a code snippet to show you how to get Standard Time and Military Time in ActionScript 3.

continue reading »