Introduction to Programming
Article by Ben Calder (aka blindfish) - April 2009Contents
- Introduction (this page)
- Events, parameters, properties and actions
- Reading parameters, properties and variables
- Setting properties and variables
- More complex variable assignments
Introduction
For those with little or no previous experience the idea of using programming in a mediascape may seem a little daunting; however complex interactions can be achieved using surprisingly little code. It's also worth pointing out that, for example, the simple process of playing an audio clip is done using programming code. Having a better understanding of how this all works will help you get the most out of the mediascape toolkit.Structure
Programming languages work very much like written languages - you have to watch out for things like spelling and grammar (in programming speak: 'syntax'), but just as important is the overall structure of your document. When writing an essay you would normally start by setting out the structure in an 'essay plan', before writing anything down. It's a good idea to follow this approach when programming: try and sketch out what you want to achieve before worrying about the details of what code to use and the exact syntax. Of course before you can do this you do need to have some idea of what programming tools are available to you; this article aims to provide just such an overview.A brief note on Objects
Throughout the article there will be frequent mention of 'objects'. Whilst this has a specific meaning in the context of programming languages, for the purposes of mscape development it is enough to know that an 'object' is simply a thing (for want of a better word). Any media you add, any sensors, tools or even state variables are 'objects'. As you will see objects have properties, and usually actions, associated with them and it is by manipulating these properties and using these actions that you create a mediascape experience.Next section: Events, parameters, properties and actions >>>