Category: Tutorials

This category contains all articles that are tutorials.

Showing 4 posts.

Using modules and dependency management in JavaScript applications with AMD - require.js

June 2nd, 2013    by sigman    4106
  Tutorials   programming, javascript

requirejs logoOne of the first things I had to learn when starting developing JavaScript applications was how to overcome lack of dependency management and concept of modules and namespaces. Unfortunately there are few JS books touching on these topics. When building large scale application, implementing hundreds of <script> tags becomes really hard to manage, especially when we need to keep them in specific order. Also the more script tags are included in the html files, the more requests a browser needs to do - this may cause a significant impact to the overall user experience - loading times, UI freezes... As JS lately became a language of choice for developing web applications targeting not only desktops but also mobile devices, developers needed to find a solution for that. Instead of waiting for changes to the JS specification ( and for implementing that consequently to the popular browsers, they agreed for a standard that would be used both on server and client side and they named it CommonJS ( The solution works great with JS on the server side but due to the fact that files are loaded synchronously, it doesn't work well with browsers as this would block user interface during script load process. So the client side solution was modified for asynchronous loading by wrapping modules in files into callback functions. This is known as AMD - Asynchronous Module Definition
(, One of the most popular AMD loader solutions is the require.js and in this article we will look how to use it.

continue reading...

AGAL multitexture shader

September 5th, 2012    by sigman    6527
  Tutorials   actionscript, programming

Inspired by the great blog post from Devon_O on conversion of GLSL (OpenGL) shaders to AGAL shaders, I decided to pick one of the examples available on Shader Toy website and to my suprise it wasn't that hard to get it working. I wanted to put the example with code on the Wonderfl but I can't get it running over there so I decided to put it here. And while I put it here, why not add just few additional words about shaders in AGAL...

continue reading...

Simple pathfinding algorithm in ActionScript 3

August 6th, 2011    by sigman    13065
  Tutorials   actionscript, programming

I was asked to quickly build an algorithm to find the shortest path for a labirinth game. First thing I did was check for some quick ideas on Wikipedia and found this article: As there was only a text description I quickly wrote a simple ActionScript 3 class returning coordinates that create the shortest path.

continue reading...

Starting with AIR for Android and iOS - building one app for both platforms

May 10th, 2011    by sigman    65323
  Tutorials   actionscript, mobile

Nearly half year after I published a quick tutorial on how to set everything up to build AIR apps for Android, I find it pretty much outdated... At that time Flash developers could export their projects for Android using AIR 2.5 and for iOS using PFI (Packager for iPhone) which had functionalities matching AIR 2.0. On March 2011 Adobe have released AIR 2.6, which brings plenty of new features to Android but more importantly it brings them to iOS as well. In this article I will go through steps to create and publish your first simple app for both devices - Android and iPhone using Flash Professional CS5 and AIR 2.6.

continue reading...