Richard Parnaby-King

Web Developer – PHP, Zend Framework and Actionscript 3

AS3 Access Stage Dimensions in Sub Class

Posted on | April 24, 2012 | No Comments

Positioning elements on screen is a tricky process when you are doing it only by code. And even harder when you want to make the class you are writing modular or reusable. A very simple example being, you want to set the width and height of the stage to 800 x 600, then import a preloader that places some loading text at the very centre of the stage.

This post will show how to access the width and height dimensions of the stage in the preloader class.
Read more

Custom Zend Validate EmailAddress Error Message

Posted on | April 23, 2012 | 1 Comment

Anyone who has tried to validate a user input using Zend_Validate_EmailAddress will find that there are a LOT of error messages returned – one for each problem with the email address:

  • Invalid format
  • Invalid hostname
  • Invalid mx record
  • and 5 more

This class will replaces all the error messages with one message.
Read more

Progressive Enhancement vs Graceful Degradation

Posted on | April 20, 2012 | 5 Comments

If you have programmed anything in javascript or flash then you have probably come across the problem of “what to show the user if they don’t have (javascript|flash)”.

There are two approaches to solving the problem: Progressive Enhancement and Graceful Degradation.

This post will introduce both concepts (hopefully unbiasedly), with examples of both.
Read more

jQuery UI Slider Legend Under Slider

Posted on | April 19, 2012 | 7 Comments

jQuery UI Slider makes selected elements into sliders. There are various options such as multiple handles, and ranges. The handle can be moved with the mouse or the arrow keys.

It is possible to control a select element, showing the options as the slider is moved. But what happens if the options are not as simple or predictable as 1, 2, 3,..?
Read more

AS3, FlashDevelop, and Me

Posted on | April 7, 2012 | No Comments

FlashDevelopI am a big fan of So when the tutorials start coming in referring to FlashDevelop, well, I had to investigate. I am ashamed to say it has taken me a year to get the time needed to have a serious play with FlashDevelop. But! I am playing with it. Or, at least trying to.
Read more

Check if a Module is Available in Zend Framework

Posted on | April 5, 2012 | 1 Comment

You’re developing a huge application, but want your code to be modular so that you can use it again else where. But what happens if one module is dependent on another, and you have forgotten to include it?

For example, you may have a ‘products’ module that allows you to add, edit, and view products. Later you decide you want to start selling these so create an ‘ecart’ module. In a later application you install the ecart module but not the products module, and wonder why it doesn’t work…

This bit of code will check if the dependent module is available to the application.
Read more

Use GMail to send Emails in Zend Framework

Posted on | April 4, 2012 | 1 Comment

It may be that your server does not allow you to send emails, for example a shared server or localhost that you cannot configure.

In either case, if you are using the Zend Framework’s Zend_Mail component, you can have your application send the emails through GMail.
Read more

Zend Form Default Decorators

Posted on | April 2, 2012 | 4 Comments

In the world of web development, forms are basis of most of your application. Everything that is displayed comes first from a form. The Zend Framework includes a wonderful form class, Zend_Form, that makes it easy to create elements, and when the form is submitted, to filter and validate the user input. What is not so wonderful, are the default decorators that Zend_Form uses.
Read more

Prevent Scaling With ActionScript 3

Posted on | March 28, 2012 | No Comments

So you have a flash application that looks great in a webpage, but when you view the .swf file directly in the browser it stretches and distorts and looks plain ugly. Fortunately, there is a solution!
Read more

GreaseMonkey April Fools Script

Posted on | March 27, 2012 | No Comments

April 1st is typically associated with playing pranks on friends and co-workers. Sometimes these can be as simple as putting a bit of paper over the sensor on their mouse, unplugging a keyboard, or changing their desktop background to a broken LCD display image.

GreaseMonkey is a Firefox add-on that allows you to customize the way a web page displays or behaves, by using small bits of JavaScript.

This April Fools Script will randomly insert a random character of the alphabet where the user is typing in Firefox (for example an email in Gmail).
Read more

« go backkeep looking »

    Having twelve years of programming experience in PHP, Zend Framework and ActionScript3, I have a very strong working knowledge of object orientated programming.

    I am a PC Gamer! Playing FPS, RTS, RPG and the occasional MMO since 1996 I have a huge number of a variety of fast-paced games.

  • Recent Posts

  • Categories