A JSON Tutorial. Getting started with JSON using JavaScript and jQuery

Javascript has grown from a way to add interactivity on your page, to a language that lets you perform tasks that once belonged to servers. JSON provides for an easy way to create and store data structures within JavaScript. It’s super popular and a great alternative to XML. JSON stands for JavaScript Object Notation…it’s called that because storing data with JSON creates a JavaScript object. The JavaScript object can be easily parsed and manipulated with JavaScript.

Continue reading “A JSON Tutorial. Getting started with JSON using JavaScript and jQuery”

View Source: Creating a Photo Rotator with JQuery Cycle

I love the JQuery tagline…write less, do more. It’s a perfect summary of what the language is about. JQuery is a JavaScript library that makes it easier to add interactivity on your projects. The nice thing about JQuery is that it takes care of dealing with browser inconsistencies and gives you great way to access the DOM (Document Object Model). You can do amazing things in just a few lines of code.

Continue reading “View Source: Creating a Photo Rotator with JQuery Cycle”

Communication between JavaScript and Flash

Most web developers are familiar with JavaScript…the scripting language of the web. And while ActionScript is not as popular as it used to be, there’s one instance where you should most definitely learn it…media. To date HTML5’s video and audio tag are mired in chaos. A lack of a cohesive format for all browsers forces people to display media in a combination of Flash for some devices and HTML5 for others.

Continue reading “Communication between JavaScript and Flash”

Detect if browser can play html5 media format with JavaScript

I love the concept of Modernizr, but when you can do something simple with a couple of lines of JavaScript without loading another library, you probably should.

Say, for example that I want to display a video with HTML5’s <video> tag, but I need to detect wether my browser supports MP4 or Theora.Ogg. You can do it easily with the canPlayType() method. You can simple create a new media element and then use the canPlayType to check for the proper format support.

Continue reading “Detect if browser can play html5 media format with JavaScript”