Flash video bufferTime gotcha

I have recently been working on a website that contains a lot of video content, including some fairly short videos – less than 20 seconds in length. To ensure uninterrupted playback of these short clips I thought it would be smart to buffer the entire video stream before beginning playback.

In AS3 this can be achieved using the bufferTime property, which I set to 20 seconds:

var nc:NetConnection = new NetConnection();
nc.connect(null);
 
var ns:NetStream = new NetStream(this.introVideoConnection);
ns.bufferTime = 20;
 
var video:Video = new Video(320, 240);
this.addChild(video);
video.attachNetStream(ns);
 
ns.play("myvideo.flv");

But when I tested the results on a remote server I discovered that Flash was waiting the entire 20 second duration before starting the video stream, despite the fact that the flv had fully downloaded in just a few seconds.

Erase an image using your mouse in AS3

I recently had to create a simple Flash application that allowed the user to ‘erase’ an image using their mouse. I couldn’t find any examples of the exact effect I wanted, so I cobbled together my own. The effect I came up with is similar to using the eraser tool in Photoshop.

Demo

Click and drag your mouse on the image below to erase it. Press the reset button to start over.

Get Adobe Flash player

 

FlashScaler now works with SWFObject 2

One of my readers, René, asked me if my FlashScaler JavaScript class works with SWFObject 2. I’m happy to say that yes, it does. The demo and download on my original FlashScaler post now include working examples using SWFObject 2.1.

Version targeting lessons from Flash

In my last post I outlined some of the problems that might arise from the proposed version targeting changes to Internet Explorer 8. My major concern was that by removing the motivation for web authors to update legacy sites, version targeting might hamper the adoption of modern web development techniques. During the week I have given some more thought to this issue, and it occurred to me that in Adobe Flash we have a fantastic real-world test case from which we might learn if version targeting is a viable strategy for a web browser.

Papervision 3D

Papervision 3D logo

If you work with Flash at all, by now you will have heard of Papervision 3D, the open source project that has turned the Flash world on its head by introducing a 3rd dimension. I had a quick play with Papervision 3D a few months ago and found it surprising easy to pick up. It is now in public beta so I decided to dust off my old project and rewrite it in Actionscript 3.

Safari 3 fixes Flash flicker bug

After a quick play with Safari 3 beta on a Mac, I am happy to report that the infamous Safari Flash “flicker” bug has been fixed. If you are a Safari user then I’m sure you have encountered this bug before – it occurs when HTML content containing hover effects appears over Flash, such as when a dropdown menu overlaps a Flash movie embedded further down the page.

Will Silverlight really kill Flash?

Silverlight logo

Silverlight is Microsoft’s new browser plugin for Rich Internet Applications, and since the unveiling of the latest alpha version it has been dubbed a “Flash killer” by many commentators. Silverlight is a Flash competitor to be sure, but a Flash killer? I think that may be overstating the case.

swfIR – a new twist for web images

You’re probably already familiar with sIFR, a technique that replaces boring HTML text with spiffy Flash text, without messing up your HTML markup. In the same vein comes swfIR, which uses Flash to perform a host of desirable modifications to images: borders, rounded corners, rotation and drop shadows.

swfIR example

Flash + Web 2.0 = yourminis

yourminis is Goowy’s foray into the ‘customizable homepage’ space, a veritable smoragasbord of RSS feeds and widgets. The service is very similar to Netvibes, but with one big difference – yourminis is a Flash application.

yourminis screenshot

Flash’s Weaknesses: Then and Now

Back in 2003 Mark Angeletti wrote an article for Sitepoint titled Flash Vs. CSS/HTML: Which Will You Choose?, in which he examined the strengths and weaknesses of Flash. Mark closed his article by suggesting that in the future Macromedia had the opportunity to fix Flash’s weaknesses, and would likely do so. I thought it would be interesting to look at how much progress has been made in the past four years, and see if those weaknesses have indeed been addressed, or if there is still work to be done.

 

Pixel Acres is powered by WordPress