Communication between JavaScript and Flash

Most web developers are familiar with JavaScript…the scripting language of the web. And while ActionScript is not as popular as it used to be, there’s one instance where you should most definitely learn it…media. To date HTML5’s video and audio tag are mired in chaos. A lack of a cohesive format for all browsers forces people to display media in a combination of Flash for some devices and HTML5 for others.

Continue reading “Communication between JavaScript and Flash”

Detect if browser can play html5 media format with JavaScript

I love the concept of Modernizr, but when you can do something simple with a couple of lines of JavaScript without loading another library, you probably should.

Say, for example that I want to display a video with HTML5’s <video> tag, but I need to detect wether my browser supports MP4 or Theora.Ogg. You can do it easily with the canPlayType() method. You can simple create a new media element and then use the canPlayType to check for the proper format support.

Continue reading “Detect if browser can play html5 media format with JavaScript”

Preview images while writing blog posts with MarkDown and ImgUR

I love simple things and when someone makes a product that is easy to use and solves a problem, it makes me happy. Case in point, something you might have never heard of. http://imgur (pronounced imager). It’s a service that hosts your photos so that you can post them on the web…say on a blog post, twitter, etc. So there’s plenty of image uploaders out there, but the problem this one solves is when I’m writing a blog post for say some other website. I like to use markdown, while I’m writing, but unless I put the images on a server or create an actual post, there’s no way for me to preview the images WHILE I’m writing the post.

Continue reading “Preview images while writing blog posts with MarkDown and ImgUR”