Contact Me


Recent Posts


Categories


Archives


Tags

3d actionscript Actionscript 2 Actionscript 3 api APIs as2 as3 brand caching carousel channel code compress contest contract CSS Flash flv fp10 free freelance gadget gadgets gdata google JavaScript jquery mvc papervision papervision3d PHP player playlist puremvc pv3d search tube tutorial twitter video widget XML you youtube

Recent Comments

  • Ahmed: Can you put up an example?
  • Ahmed: Hmmm sorry this is a tough one but I don’t work with ASP.NET! Sorry!
  • Michael: Good example but one question… in all the slider skinning I see with Flex the thumb overruns the left...
  • venkata: Hi I am using OAuth to connect to youtube api. I got accessToken and TokenSecret for a particular user. Now...
  • Ahmed: Good old flexlib, what component are you using?

Links


Help end world hunger

Posts Tagged “JavaScript”

Introducing Vid – A jQuery Plugin For All Your Video Embedding Needs

Sunday, November 1st, 2009

It all started with a tweet:

@tensafefrogs: Cleaning up the YouTube embed code a bit: http://bit.ly/3oA4yM

I replied to Geoff saying ‘why not use javascript?’ to which he said: ‘because we want to be compatible with many (every) publishing platforms, and many of them don’t allow javascript’.

So that got me thinking, why not create a simple and small jQuery plugin for embedding videos… So I did…
(more…)

YouTube OAuth/AuthSub *Doesn’t* Do iFrames

Tuesday, September 15th, 2009

What a shame. YouTube officially doesn’t support “iframes” when it comes to OAuth and AuthSub. That’s a bit of a pain, but have no fear, I’ve found a way around it.
(more…)

Authenticating And Uploading A Video To YouTube

Tuesday, September 1st, 2009

Update: I’ve added a nice little example below and all the code is up on Github.

So, I’ve been working on a simple tool that outlines how easy it is to upload a video to YouTube through your own web application.

Before you read this tutorial, it’s worth going through the YouTube GData API.

Now you may be asking yourself: “why would anyone need this?”, well think about this scenario:
(more…)

Detecting The Domain Name In Actionscript

Wednesday, August 12th, 2009

Recently, I had to detect where my Flash application was being loaded. This was because it behaved differently when it was on the site or embedded externally. It seemed silly creating a whole new application for the sake of one or two views, so I figured the best way was to detect the application’s current location.

Now reading through the Actionscript 3 documentation leads you to believe that you can figure out the applications current URL through the “LoaderInfo.loaderURL” but all that presents you with is the URL from where the application is being loaded not the browser’s current URL.
(more…)

Adding the “Safari” Style Search Box to Your Site

Friday, August 7th, 2009

So recently I published a post that contained a quick and simple browser detection snippet for jQuery. In that snippet, I accidently left a reference to a function called “initSafariSearch()”.

This function simply replaces the standard boring input text box with the nice Safari style one.
(more…)

Quick jQuery Browser Detection Snippet

Thursday, July 16th, 2009

Update: I’ve added a little example below…

As most of you know there lurks browsers that we don’t really like building web sites for (*cough* Internet Explorer) and there comes a time in any developers work when they need to detect browsers. jQuery has a really nice API for detecting browsers, but sometimes you want to go a bit further.

The snippet I’m putting on this page will detect the browser and OS for you and add a nice little CSS class to the body tag, thus allowing you to write up all your CSS ready for users of different browser and OS creed.
(more…)

Compressing and Caching Static Text-based Assets with PHP

Friday, July 10th, 2009

So recently I’ve been playing around with GZIP compression on Apache and PHP to see how fast I can get my assets to load. Now I’ve written a post already on how to compress sites with GZIP.

Now I’ve taken my script to a new level, that is the asset loader script that compresses text-based assets using GZIP. I’m not using any sort of code compressor on the assets, yet, as I’ve already compressed the scripts using YUI. More importantly, I’ve now added the ability for me to cache a number of files into one rather than loading several, as we all know: less HTTP request = more fun.
(more…)

jQuery’s Missing AJAX Function (and CodeIgnitor)

Tuesday, June 16th, 2009

This is a really handy tip if you use jQuery frequently and are receiving JSON data back. jQuery’s “$.post” allows you to do a POST call to your application and get the data back, but you have to flag the type of data being received by jQuery so that it can parse it.
(more…)

Speeding up Sites with GZip

Thursday, May 28th, 2009

Web sites need to be fast! Recently I’ve had some time on my hands so I’ve done some tests to see which is the best solution. I’ve had a read about different ways that web sites can be sped up, from compression before you upload files to server side compression.

Whenever it comes to speeding things up, I always remember the saying that “loading data from a flat file is slow, a database is slower, but memory is the quickest”. So that means if you’ve using server-side scripting such as PHP or Python, the best thing to do is to use memory caching such as APC or MemCache.
(more…)

Coding Conventions

Sunday, May 17th, 2009

Recently I joined a debate started by the editor of Flashtuts+ regarding coding conventions. Now I’m a strong believer that if you’re going to code, you best do it right. Yet on a day to day level I still see sloppy code. Gone are the days of Actionscript 1 and 2 coding when you didn’t have to declare variable’s type or a function’s return value, but still people continue this in their coding of Actionscript 3.

The fun doesn’t stop there. I admit, when I first started coding yes I was very sloppy with my convention, but I’ve cleaned up my act, honest. With other languages such as PHP and JavaScript, you see how easy it is to just keep typing and typing and through any sort of convention out of the window. But when the client turns around as says: “Why can’t that be 3D?” you’re then going to have to go through all your sloppy code and make it 3D.
(more…)

Fork me on GitHub