Onswipe

Kudos to Mashable for alerting me to Onswipe:

http://mashable.com/2011/03/23/18-million-wordpress-websites-now-available-in-ipad-format/

If you’re lucky enough to have an iPad (or iPad 2), you can now view WordPress blogs in a true iPad app style interface. Even self-hosted blogs (like this one) can join in by installing the Onswipe plugin.

Now all I need is an iPad 2 to try it out. 🙂

{lang: 'en-GB'}

Clickable, Transparent Sprite in AS 3

For the past few days I have had a problem. In ActionScript I wanted to do the following:

	public class TableauPile extends Sprite
	{
		public function TableauPile()
		{
			setImage();
		}
		private function setImage():void
		{
			width = 74;
			height = 98;
			graphics.clear();
			graphics.lineStyle(2,0xC0C0C0);
			graphics.drawRect(0,0,74,98);
			graphics.endFill();
		}
	}

This draws a nice “empty” box, allowing you to see the background beneath it. Oddly though, it doesn’t respond to mouse down events. Not unless you are lucky enough to accidentally click on the thin border. Attempting to write a FreeCell clone in Actionscript, as I am, it would be useful to receive mouse down events for empty boxes.

After much head scratching, Googling, and experimentation I have discovered that the only way to get the sprite to respond to mouse down events, is to fill it with a solid colour and set the alpha to 0. This can be accomplished by adding the following line before the endFill statement:

	graphics.beginFill(0xFFFFFF,0.0);
{lang: 'en-GB'}

WordPress Themes