Save The DJ
Brief
A flash game, used to promote competition entries for the Rizla Invisible Players tour 2010. Players get 30 seconds to connect as many wires as possible, with each connected wire counting as an entry into the competition. Players can win up to 7 entires per day as submissions are limited to once a day.
Implementation
This Flash game for Rizla was created in AS3 using a few custom classes (SaveTheDJ.as, Wire.as, and WireEvent.as). It also uses Paul Tondeur’s CubicBezierCurve class to acheive a cubic bezier curve, as Flash only supports drawing quadratic bezier curves with code.
The document class includes an array of arrays which stores all the data needed for each wire object. Wire objects require 7 parameters in order to instantiate, these include; startX and startY position (beginning of the wire – joins onto existing wire-end on the stage), jackX and jackY position (end of the wire with the jack plug), targetClip (which hole it should plug into), thickness of the wire and colour of the wire.
There are various visual elements used for feedback of a successful wire connection, including speedo counter, coloured lights turning on for successful connection (top left) and a total count.
Connecting at least one wire results in success (ie. 1 entry to the competition) and triggers crowd cheering audio. Failure to connect any wires results in boos from the crowd plus the opportunity to play again.
The final form submission has client side validation included in the Flash (as well as server side once the data gets sent to the PHP script). The data is sent to the server and an appropriate response occurs in the Flash when the XML response is received.