Monthly Archive for April, 2007

How to feel a Twit

I am famous, originally uploaded by yezzer.

Twitter is …strange. A while ago I had this printed in the guardian. After checking out the online article I saw they had misspelled my name, so I let them know :)

I’ve just seen that they’ve changed my name to the correct spelling. Hurrah.

How easy is JSON?

Although i’ve done a few AJAX’y things over the past year, i’ve yet to touch AJAJ.

After reading about Aral’s SWXFormat, I thought it would be a good idea to familiarise myself with JSON, so when it looked like i’d have to use some AJAX in my portfolio, I looked up a JSON example, and I must say i’m pleasantly surprised that using JSON with jQuery can be so simple.

Here’s the JSON:
[js]
{
“wintitle”: “Window Title”,
“url”: “http://domain.com”,
“height”: 415, “width”: 720
}
[/js]

And this is JS loading the JSON (using jQuery):
[js]
$.getJSON(”http://domain.com/script.php”,
{ field: “value” }, // send field value pairs
function(json){//return function
GB_showCenter(json.wintitle, json.url,json.height,json.width)
});
[/js]

How simple is that! All that time i spent parsing XML in javascript is over, yey!

As soon as i have a spare minute i’m going to create some swxformat tests - looks like it could be an even easier way to get data into flash!

24 hours of Flickr goodness

A global day-long photo project. Take photos of your day and stick them on Flickr.

I’ll definitely be taking part, and i’d have thought there might be a fair few brightonians taking part too.

Check out the Flickr blog and group for more info.

Bye Fritz!

Fritz, originally uploaded by yezzer.

Lucky man’s off to Taiwan!

getURL() not working

I was taking a look at ThickBox earlier, and having a nose around calling it from Flash. To do this, I needed to call JavaScript from flash.

Although if you’re using Flash 8, you should probably use ExternalInterface, the quickest way to do this is by calling:
[as]
getURL(”javascript:functionName(param1,param2)”)
[/as]

It’s been a while since i’ve needed to to do this, and it just wasn’t working on a simple test. Even simplifying this wouldn’t work in either Firefox or IE:

[as]
getURL(”javascript:alert(’hi’)”)
[/as]

Turns out it works fine when the content is served through a webserver.

Also, after reading one of Mike Chambers posts, I found you can run this locally, if you put this in your object and embed tags:

[html]
allowScriptAccess=”always”
name=”allowScriptAccess” value=”always”
[/html]

Of course, this has other implications, so best not to do this unless you know what you’re doing.

test email entry