Archive for the ‘Code Examples’ Category

Automatic Number Plate Recognition for Digital Signage

Thursday, January 20th, 2011

Here’s the lowdown on the digital billboard campaign I delivered in 2009 that recognised the make/model of a passing car and then displayed an advert tailored to that car. Here’s a link to a video of the advert in action

The prototype code that was used to prove that the ‘Castrol Oilcam’ project would work is detailed below.

The ANPR (Automatic NumberPlate Recognition) camera output has been replaced with a text file called latest.lpr. Put a UK car number plate in this text file, in the same folder as the flash movie and the flash movie will read it.

The most progress I made in this version was realizing I can send an html request/query from Flash and then ingest/interrogate the resulting html page source code from the host web server.

If you haven’t done so before, please read the site disclaimer before downloading and/or commenting.

download the prototype code here

Flash Olympic Games Dynamic Countdown Timer Template for Digital Signage

Thursday, August 26th, 2010

There was much excitement in the London press a few weeks ago about the Olympic Games being only two years away. About the same time I was asked by a friend for a bit of ‘dynamic countdown’ creative that they could use to test their screens with ahead of a countdown campaign that was launching across UK digital screen networks in early September.

So, like a man who has a couple of anorexic girlfriends, I thought this was a good ‘two birds one stone’ situation (that joke was pinched from Dave Gibson BTW).

I made use of the dynamic countdown code from the excellent flash programming site here.

You can download the .swf and actionscript2 .fla files from www.thisadvertneedsyou.com/samples/countdown.zip

If you haven’t done so before, please read the site disclaimer before downloading and/or commenting.

World Cup 2010 Live Score Flash XML Template Example for Digital Signage

Thursday, June 10th, 2010

Now that all the commercial guys have safely tied up their lucrative  world cup content/licence deals with the digital signage networks, I thought I’d share a simple way of getting the latest world cup scores and scorers onto your digital panel with a couple of simple Flash RSS/XML templates.

There is a 9:16 Portrait Template and 16:9 Landscape Template available for you to download, modify and make use of.  Each zip file contains the source .fla, the .swf movie and a windows .exe version for use on any PC.

If you use this template for commercial gain you need to consider:

  1. giving a donation to the guy who faithfully updates all the RSS feeds at http://www.rsslivescores.com/
  2. changing the background and (hidden) mask graphics in the .fla, as I got the original graphic from Google images, which I then cleaned up.

If you haven’t done so before, please read the site disclaimer before downloading and/or commenting.

Have fun, I’m hoping I generate enough good karma here for England to go all the way and win it (preferably beating Germany/Portugal/Argentina/Brazil on the way too…. ;) )

Digital Signage Flash Template for Loading XML Data

Thursday, May 13th, 2010

In October 2009, Titan Outdoor and MySpace ran a 4 week promotion whereby any MySpace account holder could enter picture and text onto a MySpace group page and the resulting image and message would play on the Titan Screen networks in New York, Chicago and London.

Digital signage software specialists from Dynamax, CoolSign and Litelogic collaborated with the MySpace coders to identify a common xml format which all platforms could recognize to display the pictures/text stored from MySpace form to the DOOH Screen networks on both sides of the Atlantic.

I have hosted a sample copy of this XML file here.

The prototype flash template I made (and have made available for download) steps though the available records in the titan.xml file from ‘most recent’ to ‘oldest’ at an interval of 5 seconds.

You will see that the user text comes from the xml file and the jpeg image is loaded from a location detailed in the xml data.

This a nice simple example of how to load text into a flash file from an xml source, load/size a picture and step through an xml data set. 

If you haven’t done so before, please read the site disclaimer before downloading and/or commenting. Download source files here

Twitter Feed Reader for Digital Signage Layouts

Monday, May 10th, 2010

This simple flash file displays the top five recent entries from any named twitter account. It  is currently designed to sit at the bottom of a 1280×768 digital signage screen layout and read the @thisadneedsyou news updates. By downloading the source files you can edit it’s source feed, graphics and dimentions.

The nice thing about this file is that it allows any person with internet access to update a twitter news feed, with the updated text being instantly read by this flash twitter reader on screen.

The twitter feed text fades onto screen, holds for 10 seconds and then the next news story loads. This method is a lot better than the traditional ‘TV news tickers’ that scroll constantly from right to left. The right->left scroll method is OK for TV but not the right approach for digital signage which should never be confused with the broadcasting medium.

There is also some bonus Actionscript in the source files which shows how to get local PC date, month, year and time into a flash movie.

If you haven’t done so before, please read the site disclaimer before downloading and/or commenting.

download source files here

Temperature Sensing Sign

Tuesday, May 4th, 2010

This is my latest Flash experiment. The movie reads the temperature from a temperature sensor and loads a choice of jpeg file depending on the temperature reading taken.

The sensor used was a WxGoos3 Climate monitor from itwatchdogs.com

I can’t seem to find that exact model online anymore but I assume that the Minigoose II is the latest model.

This code withstands the failure modes described in the site disclaimer – although in quite a convoluted way! The best thing I can say about the sample is that I can yank the power cord in/out of the sensor and the network cable in/out the PC and it still recovers when everything is plugged in again.

Note that the IP address of the Climate sensor is hard coded into the Flash source – but It’s easy to find and change.

If you haven’t done so before, please read the site disclaimer before downloading and/or commenting.

download here

3D Clock Effect for Digital Signage

Tuesday, May 4th, 2010

This takes the sample code from Clock 1 and fudges a 3D rotation of the face onto a more sophisticated creative background. It was only intended for use on low res LED screens, and I don’t think this would be suitable for a HD LCD screen.

If you haven’t done so before, please read the site disclaimer before downloading and/or commenting.

download here

Dynamic Clock Code for Digital Signage

Tuesday, May 4th, 2010

This little sample is a great way to understand the basics of coding in Flash.

It takes input from your PC clock and converts the numerical time by drawing lines to the right length and angle (vector) to simulate clock hands. A nice subtle bit of advertising too.

If you haven’t done so before, please read the site disclaimer before downloading and/or commenting.

download here