Tag Archives: javascript

YouView – Smart TV UI

YouView is a Smart TV service in the UK, which runs on Set Top Boxes and Smart TVs. I worked on the original UI for years and thought I’d share some insights into best practices for building applications on such resource constrained devices.

Continue reading YouView – Smart TV UI

Unity – what Virtools should have become

I’ve been playing around with the Unity game engine and keep having flashbacks to a little know 3-D game dev tool I used over 10 years ago – called Virtools.

virtools1virtools2

Most people will not have heard of Virtools, which itself was called NemoCreation in a previous life, until legal problems forced them to go away and rebrand. It was way ahead of its time, supporting real-time ray-tracing, hardware acceleration, full Havok physics an easy to integrate multi-player solution, long before the more popular Shockwave 3D and WildTangent had anything close.

The workflow was very similar to Unity and I had originally pinned a lot of hope on it. But, the platform was too restrictive, provided no sensible scripting alternatives and was prohibitively expensive to license. Getting hold of a trial license was notoriously difficult, too. So there were simply not enough people creating worthwhile content for it.

The licensing fubar and possibly the fact that it was way ahead of its time, were probably its death knell. But I tip my hat to what could have been.

MouseWheelTrap – how to stop simultaneous Flash / browser scrolling

Update: This project is now hosted at GitHub. There are currently known issues with Chrome’s PPAPI plugin architecture. USE AT YOUR OWN RISK.

I recently stumbled over a new AS3 gotcha that seems to be bugging a lot of the Flash community. Apparently a new ‘feature’ of AS3, whereby using the mousewheel inside an embedded Flash movie still scrolls the surrounding browser window (if it has enough content, that is).

This didn’t happen in AS2. If a Flash movie had focus, mousewheel events weren’t sent to the browser window. It wasn’t a problem in FireFox either, until a recent update and adversely affects any AS3 Flash app embedded in an HTML page where you might want to scroll or zoom with the mousewheel while over the Flash, instead of the scrolling the browser window.

So, I decided to cook up some code to fix this. While it’s early version and isn’t perfect, it suits my purposes, is easy to set up and doesn’t require any external JavaScript – so I’d thought I’d share it with the world, in case Adobe never get around to addressing this ‘feature’.

Introducing MouseWheelTrap. A handy little utility class that traps mousewheel events while the mouse is over the Flash, so your app scrolls how it was intended to. I’ve tested it with SWFObject on PC IE and FireFox, but not with SWFMacMouseWheel on Mac (if someone could tell me if it works). I decided against using jQuery for trapping mouse events, partly out of laziness, partly because many people have no control over the HTML that embeds their Flash app and therefore can’t add custom JavaScript.

Setting up MouseWheelTrap is easy:

  • Download the MouseWheelTrap ZIP package, or just the AS file.
  • Unzip the package and have a look at the demo, or just take the MouseWheelTrap.as file and put it in the com.spikything.utils folder into your own project or classpath.
  • Import the utility and set it up somewhere in your main class like so:
import com.spikything.utils.MouseWheelTrap;
MouseWheelTrap.setup(stage);

Simple huh? Let me know how you get on…