Skip to content

Instantly share code, notes, and snippets.

@philsmithsonuk
philsmithsonuk / index.js
Created July 1, 2014 13:55
Given a sentence as a string, fade in each word and play a sound when the word has been faded in. Titanium Appcelerator.
//import builtin alloy animations
var animation = require('alloy/animation');
var wordString = "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program";
var wordArray = wordString.split(" ");
var lblArray = [];
var lbl = null;
//Generate Label element for each word