Download simulator

OK, so this isn’t so amazing or new or anything other than what it is… which is a very simply Flash tool I made today at work to help describe to clients how long something takes to download on a 56k dialup vs a DSL connection.

Props to OJ for the functions to calculate the speed, as I was suffering from lack of coffee, or lack of sleep, or both. Either way, let’s call this our first collaborative widget!! Hehehe!

[kml_flashembed movie="/blog/swf/download-simulator.swf" width="350" height="200" fversion="8" /]

3D in Flash

Paper Vision 3D is a (relatively) new AS3 Flash 3D engine… using the greatly improved rendering power of Flash 9, this almost makes responsive 3D environments in Flash a possibility. Exciting!

Be sure to check out this demo. It’s nothing you can’t do with Quicktime, but boy it feels good on my computer :)

SWF and UFO holding hands

The popular Flash javascript embed techniques SWFObject and UFO have joined forces to create SWFFix. Still in it’s alpha stage, this is a development to keep an eye on.

They have already created this very useful test suite which highlights the complexity of making a generic and graceful embed technique for Flash content.

Really, it shouldn’t be this hard to embed Flash cross browser cross platform, but unfortunately it is. So hopefully we see even more improvement on the already very good SWFObject techniques in the near future…

Banner vs Browser

Here’s a unique banner ad experience courtesy of SMH.com.au. (Click for a more detailed look)

George Michael, advertising his latest offering… and usually I wouldn’t be tempted to click a banner… but this one was soo bad that I was compelled to!

What was I expecting to happen? I’m not sure, maybe some tacky joke reflecting on George’s past experiences, or some bling bling cheap animation (in keeping with the rest) … but I wasn’t expecting the click thru url to load within the banner ad!

I’m still confused if it was their intention, or not – as the original banner was pretty dodgy so I wouldn’t rule it out. Either way, pretty bad really.

Update : Fairfax’s banner ads use iframes, so my guess is that the designer forgot to add a blank target to clickTag.

Accessibility not an option

I visited the Australian goverment website promoting Australia Day 2007 yesterday, and what I saw kind of made me question if Accessibility is still an issue anymore…

You see, as far as I understood it, if a site was created by the government and for the people, it needed to be accessible by everyone. First thing that strikes me when I hit the site is that it’s made entirely with Flash. Now, this doesn’t necessarily mean it isn’t accessible, but being the inquisitive sprite that I am, I gave it a go with the ol’ keyboard… and… well, nothing.

Nope, not a thing. No little yellow highlight boxes around active areas, no link for an alternative version of the content…. nothing. For those that don’t know, Flash movies can be navigated using the keyboard, and any hotspots or buttons , when tabbed to, will get a big yellow highlight box around them.

Now, i’m not suggesting that I am the guru of accessibility – I don’t even know if the shifty homepage can be navigated with your keyboard (Edit – it can be… as long as you first click somewhere on the Flash movie. In IE7, you don’t even need to do that. Just tab away!) – but one would assume that a government website would stick to its own rules. Especially given that even SOCOG was sued back in the day…

Ive done my fair share of government web work, and if sweated blood to make the most intricate of Flash animations accessible for as many people as possible – sometimes because it’s the law, and other times because it’s a nice thing to do. And in the long run, this Australia Day site is not the most important site in the world… but when a site is so blatantly a government-based website… the least they could do would be to hold the flag for the rest of us and set an example of how to do it properly.

Addition : Just read a post over at Quirksmode, and it seems that the Dutch Government are getting strict on accessibility… lets see if it’s all talk or if they are serious about it.

shiftperception.07

Well, Merry Christmas and Happy New Year to all!

Hope everyone has had as much fun as I have over the last few weeks :) Things are getting back to normal here now, and before all the Mexican adventures become posts you have to search for, I decided to take a few hours and remake the shiftperception.com/ homepage to reflect some of the feeling I got from the trip.

So, enjoy shiftperception.07. I’ll be adding onto it if I get time, and doing more experimentation and cool stuff into the new year (I promise)!

/dan

Re-designing the world’s flags

A bit of fun for your Friday afternoon. Can’t quite remember where I found this, but it brought a smile to this designer’s face :) Enjoy.

My Flags

Adobe donates Flash to Mozilla

Yup, a very clever move. The Flash player will no longer be a proprietry closed source plugin, shunned by the developers of the world. Hopefully the donation of the Flash player to Mozilla will herald a new age of interative development, and better and more standards compliant integration of Flash content with HTML, AJAX and the browser.

Read about it at these places:

  1. Adobe announcement
  2. Linux and open source blog
  3. Read Write Web
  4. Mozilla project home
  5. Implications – from Browser Den
  6. Linux Insider
  7. Desktop Linux

Animating Masked Dynamic Text

Last week I had the need to animate a mask over a dynamic text field. Having loaded the content successfully, and setting the dynamic text field to the value of the XML, I then initiated a mask transition that affected the display of the dynamic text. (Ive mocked up a set of simple examples to demonstrate).

A. Not working
[kml_flashembed movie="/blog/swf/notworking.swf" width="400" height="160" fversion="7" /]

Now, Ive used Flash for a very long time, and have never had this problem, so I was (and still am to be honest) baffled as to why, after the transition was complete, my dynamic text field lost its content, because it seemed like such a simple thing to do.

Let me point out a few things.

  1. The dynamic text field was inside a Movie Clip
  2. There was NO keyframes in the movie clip. IE, there was only one instance of it on the stage
  3. The font was embedded
  4. The mask was a keyframed shape animation and NOT set at runtime

I did some research to see if others had the problem, and found out that masking dynamic text has been a battle ground between designers and Adobe for many a year. I’m posting my solution to the problem here for you to use, or comment on, or improve. Is it a bug? Is it known behavior? Im not sure, but here’s how to reproduce both the problem, AND 2 solutions :

1. Reproduce the problem

After finding a solution, I set out to reproduce the problem in a simple movie… but initially I couldn’t. This made me question whether there was, in fact, a problem after all.

B. Working, but not solving the problem
[kml_flashembed movie="/blog/swf/working_nomc.swf" width="400" height="160" fversion="7" /]

Turns out, in the example above, the reason it works is because the mask was applied DIRECTLY to the dynamic text field – whereas in my project at work I had applied the mask to a Moive Clip that inside it had a dynamic text field. So, there’s a solution right there… however this DOES NOT answer the question, and is a very limiting solution -imagine you wanted to fade the dynamic text out or move it’s location… it would need to be INSIDE a Movie Clip.

2. Understand the problem

So, in step 1 I was able to narrow in on what the issue actually was – which turns out to be specific to masking a dynamic text field that is in a movie clip. The next thing I did was to try and find out why it was going wrong. To do this, I tried a few things :

  1. change the location of where I set the dynamic text
  2. change the way I mask the movie clip
  3. try remaking the text field
  4. try viewing in a browser as opposed to the IDE
  5. searching the web for answers

Of the above, the only thing that began to work was changing where I set the dynamic text. This sounds crazy, but it appeared that Flash was equating a keyframe in the mask animation to a new instance of the movie clip!! Which meant that each time there was a keyframe, I had to reset the dynamic text – because in this “new instance” no properties had been set. I know (at least I hope) this isn’t what’s actually happening, but anyway, it got me closer.

3. The solution

Where did that leave me? Well, initally, quite annoyed. Because my animation was quite involved, it would mean that i’d have to have actionscript on each keyframe setting the value of the dynamic text… which is a COMPLETE WASTE OF TIME and space.

So, trying one last thing, I decided that I would set the value of the text field in an onEnterFrame handler instead.

onEnterFrame = function(){
textMC._data = "Lorem Ipsum Dolor Sit Amet";
}

This I know is a messy solution, but it was the cleanest I could come up with, and more importantly… it works! See for yourself :

C. Working!!
[kml_flashembed movie="/blog/swf/working.swf" width="400" height="160" fversion="7" /]

4. Gotchas

Now this is wierd… if the onEnterFrame handler occurs OUTSIDE the scope of the mask and Movie Clip, when you delete it (the onEnterFrame that is), the dynamic text will disappear. The below example is the same as the working example, the only difference is that the onEnterFrame belongs to the _root timeline.

D. Not working again, because of scoping problem
[kml_flashembed movie="/blog/swf/notworking_scope.swf" width="400" height="160" fversion="7" /]

I told you it was wierd!!!

5. Links

If you have any suggested improvements id love to hear them. Below is a list of the FLAs used in this post ( Flash 8 ).