Archive for October, 2007


Creating scrollbars part II

Well shame on me. Tomorrow never comes. So now it’s time to catch up on the maths for a scrollbar. There are probably many ways of doing this, but this is my favourite because it’s easy, and this example uses a scroll track that is of no significant height. i.e. just a blob or something. Three bits of information are needed. Firstly, the height of the overhang from the movieclip that is being scrolled. So:

overhangHeight = movieclip._height – scrollbar._height;

The next piece of information is how far the scrollbar has been dragged. This is a percentage of the height of the scrollbar.

percentScrolled = (100/scrollbar._height) * distanceScrolledSoFar;

The final piece of information depends on the previous two and tells us the distance the main movieclip has to move to match the position of the scrollbar. I called it offset.

offset = (overhangHeight / 100) * percentScrolled;

So now we have the number we need to move the main movieclip. mc._y = (0 – offset);

Very simple but useful to have it written down, lest I ever have to try and remind myself again.


Mouse events in Papervision

This week has been a chance to find out more about Papervision, Away3D and APE physics engine. The renewed excitement came after a colleague pointed me towards the Magic Carpet. Bringing together physics and 3D like this is very impressive and I’m all over figuring out how to leverage it and over the next few weeks I plan to keep this page up to date with what I find out. After downloading the class packages and playing around, one question that came to mind was how to catch mouse events so I could interact with the 3D?

The answer I learn, is an event called MouseEvent3D, built into Away, which means the 2 dimensional x,y co-ordinates can be converted into the x,y,z co-ordinates of the 3D world. There is also a set of functions which allow mouse events to be attached to objects in the 3D world. With this in mind, extremely rich and immersive flash experiences are on the cards.


Where does Flash go now?

The design / development gap is widening and it’s industry wide. Traditional modes of working in Flash are fast disappearing in favour of a much more technical approach. There are massive benefits to this, not least the ability to build ever more exciting projects. Everything from data manipulation, user interaction, complex visuals and code management benefit from this way of working. However, let’s not forget the original appeal of Flash. When I first played around with Flash, my concept of it was Photoshop with interactions. It was a design tool. The freedom to start designing, and then code and design as I went was fun. What a great combination. It bridged a divide between the realms of creativity and technology, and anyone who wants to learn how to make really exciting user experiences without getting bogged down in theory can learn a lot from it. These days, however, there is less and less room for this type of working. Flash projects these days tend to require a great deal of traditional programming methodology to avoid becoming cumbersome and unprofitable. This makes a lot of sense, but something still niggles.

Why aren’t AS3, Flex and the other advances in Flash not intuitive to designers? Flash used to make this complex stuff easier for visual people, so why are increasingly technical minds required to understand it? What we need is some bright ideas for new ways of working. We want all the advances the technology offers, but we need to be fast enough to think of great concepts for working that maintains that spirit of creativity which Flash offers.


Thermo

Continuing on from my last post, it seems Adobe are already on the case after my colleague pointed me towards Thermo. Previously I pointed out that Adobe’s latest offerings were leaving designers out in the dark. Perhaps this new project will buck the trend.