• Home
  • Biography
  • chop.com.au

Archive for the ‘Dev’ Category.

« Previous Entries

SQL Snippet: Update table field using a join using SQL

September 8, 2010, 10:52 am  |  Posted in: Code Snippet, Dev, Uncategorized

This is a handy little snippet if you need to update one field (source) in one table (table 1) from the results of a field in a related table (table 2)


UPDATE table1 JOIN table1 ON table1.id = table2.id SET table2.source = table1.source
Comment

Lighting Hospital UK – Landing Page

September 1, 2010, 9:24 am  |  Posted in: Dev, Flash, Website

I recently did a holding page for the Lighting Hospital UK, it was a basic page prior to a full website being built. Unfortunatly I didn’t have the time to built the full site due to AIAM100 commitments, however the landing page which I built in a day was the direction I would have wanted to go in.

This nature of this site lends itself for some nice flash experimental pieces, so it would have been nice to dabble.

Anyway this was just built using CSS and incorporates the recent CSS3 border-radius property… love it!

lh_landingpage

Comment

AIAM100 Launch Party

August 28, 2010, 2:10 pm  |  Posted in: Dev, Flash, Freelance, Graphic Design, Identity, Website

After a year and a half of telling people I’ve been building this site, we finally had the AIAM100.com website and exhibtion launch party on Friday night at Cooee Art Gallery in Lamrock Ave. Bondi.

Australian Indienous Art Market top 100 (AIAM100) is a website show casing the top Australian indigenous artists based on their market performance in the secondary art market. Over 130 profiles compiled by Adrian Newstead give the user a detailed view of each artist. Market Performance results are supplied by Australian Art Sales Digest (AASD), these results allow the AIAM100 to calculate the AIAM100 index and rank each artist accordingly. It also provides the overall health of the industry, for example the peak in 2007.

Adrian Newstead at the opening of the AIAM100 website and exhibiton

Adrian Newstead at the opening of the AIAM100 website and exhibiton

Ruth Hessey & Adrian Newstead

Ruth Hessey & Adrian Newstead

Being completely built in Flash I see this website as being a RIA rather than just a website. I know I know, it’s not the normal site to be completely built in Flash, and it raised numerous challenges along the way, especially regarding text layout, formatting and resizing (which are basic things we take for granted in developing an html based site). 50% of the site is it’s cutom built php based CMS, along with an extensive database, allowing AIAM administrators to easily publish new artists profiles.

Although i’ll still be working on adding a few more features it’s a great feeling to get AIAM100.com site live into the public.

Comment

Moran Prizes web kiosk app for NSW State Library

August 27, 2010, 6:22 pm  |  Posted in: Dev, Flash, Freelance, Graphic Design

I recently just finished the ‘People’s Choice Award’ web kiosk application for the NSW State Library. The purpose of the app is to allow the public to vote on their favourite from the Moran Prizes exhibition.

The screen cast shows the general flow of the app, it was relatively siple and includes a back end admin to display user data.

Comment

Handy Hint: AMFPHP to Flash Character Encoding

June 4, 2010, 2:11 pm  |  Posted in: Dev, PHP

If you’ve ever used AMFPHP to connect your DB into Flash, you may stumble across weird characters being output! eg: – replaces the ’. The simple explanation is that the PHP is decoding it wrong.

Forget about preg_replace(), all you need to do is update your amfphp/gateway.php file to decode, encode in UTF-8.


$gateway->setCharsetHandler("utf8_decode", "UTF-8", "UTF-8");

and walla no more annoying characters sent from AMFPHP.

Comment

Freelance @ White Agency – Flash game on Wii console

May 3, 2010, 10:56 am  |  Posted in: Dev, Flash, Freelance

Last week I completed another little stint at the White Agency, Sydney. The brief was to create a little simple flash game that could be played through the opera browser on the Wii console. It was for a company called Sirtex Medical Ltd. and they wanted to create the game to highlight there medical technology in treating liver cancer with radiation.

Sirtex Flash Game

The aim of the game was to kill off the cancerous tumors by injecting the proprietory Sirtex radiation spheres in the quickest time possible, using the Wii remote you needed to have find the right blood vessel and inject the radiation.

Responsible for the game development and helping with design it was a rather enjoyable little project, as it was educational in the process. The game is going to be the key part of their exhibition which is expected to be displayed at a number of medical expos in the future.

Comment

PHP – having problems with getimagesize() when space in filename?

April 29, 2010, 7:09 pm  |  Posted in: Code Snippet, Dev, PHP

Some images containing spces in the file name led me to some errors when trying to determine their image size for manipulation using PHP.

Simply url encoding the string fixed this problem.
 

 <?php
  $imagePath = "some funky filename.jpg";
  $imagePath = str_replace(" ","%20",$imagePath);
  list($imgwidth,$imgheight) = getimagesize($imagePath);
?>
Comment

PHP Snippet – GetFileContents and save PDF

April 3, 2010, 2:51 pm  |  Posted in: Code Snippet, Dev, PHP

I needed to be able to access a pdf outside my document root… so I created the script below. Using just file_get_contents with an echo would just save it as the name of the script, using an $output_file variable and in the header you are able to specify what you want to save it as.


<?php
$output_file = 'outfilename.pdf';
$file = "target.pdf";
$fileDir = '../target/directory/';
$contents = file_get_contents($fileDir.$file);
header("Content-Disposition: attachment; filename=" . $output_file);
header('Content-type: application/pdf');
echo $contents;
exit();
?>
Comment

State Library of NSW 100 exhibiton Kiosk App

March 10, 2010, 6:15 pm  |  Posted in: Dev, Flash, Freelance, Graphic Design

I’ve just finished the design and development of a flash based kiosk app for the State Library of NSW 100 Exhibiton. Originally I was contacted by Mental Media to do the job.

The app was fairly straight forward in process, providing the public the ability to vote on their favourite exhibiton item, view favourtie exhibiton item, complete a survey and enter a draw.

All data is saved into a mySQL database and the library staff can access a admin page to download the various data as CSV files. I had some fun with PHP merging all the tables to provide a simple usable table for the non-technical staff.

kiosk_onsite2

The app is running continuously for 100 days, so it was seriously important that there were no memory leaks. Flash and no memory leaks can be a time consuming effort…. At the end of the project I did encounter a memory anomaly where the memory seemed to jump 5MB every time an image was displayed on screen, although I was loading the images from memory. It turned out it was due to the fact I added a drop shadow to the image at runtime…. therefore flash somehow needed to reprocess that shadow area as a new image. This turned into a problem when I couldn’t access it, even by removing the filter, it still kept it in memory. Quick solution.. got rid of the drop shadow.

Comment

PHP Snippet – Get Yesterdays date

February 27, 2010, 2:43 pm  |  Posted in: Code Snippet, Dev, PHP

This is a simple function that returns yesterdays date. Simple but handy.

function yesterday()
{
 $yesterday = date("Y:m:d",mktime(0,0,0,date("m") ,date("d")-1,date("Y")));
 return $yesterday;
}
Comment
« Previous Entries
  • Author

    Leon Wilson spends most of his time designing and developing flash sites, and wishes he was better at high end 3D.

  • Download V Card

  • Categories

    • 3D
    • Dev
      • Code Snippet
      • PHP
    • Flash
    • Freelance
    • General Banta
    • Graphic Design
    • Identity
    • Rumbles & Mumbles
    • Uncategorized
    • Website
  • Archives

    • September 2010
    • August 2010
    • June 2010
    • May 2010
    • April 2010
    • March 2010
    • February 2010
    • November 2009
    • September 2009
    • August 2009
    • June 2009
    • May 2009
    • April 2009
    • February 2009
Copyright © 2010 Leon Wilson. All rights reserved.
Powered by WordPress.