Blogging on InsideRIA

25 06 2009

I’ve started blogging on InsideRIA recently, and I must say – I’m enjoying it.

Latest post is on Flash & Silverlight.

Silverlight vs Flex

16 02 2009

The Silverlight vs Flex argument is hillarious!

We’ve got a statement from Adobe’s CFO here on Silverlight. Personally I think that the CFO wasn’t the best person to comment on Silverlight, but hey, maybe we got an insight into Adobe’s non-censored attitude to Silverlight. 

We’ve got a response from Tim Sneath, a Silverlight evangilist from Microsoft.

We’ve got a debate with an MS evangilist vs an Adobe evangilist. (To be fair to Silverlight, the MS guy seems like he’s a fish out of water. He starts off with a great argument about competition making us better developers, and ends up floundering).

If you ask me, Adobe needs to fix the perception that most developers have that Flash simply sux. 

The problem is, that for years, the Flash platform was only accessible to those freaks who understood and lived in the four dimensional world of Flash. Trying to code on multiple layers with inherited objects in respect to time and still understanding  scope was, and still is, a nightmare

 I think many web developers have poked their noses into Flash – and many developed a natural distaste for it. Those that tended towards design sometimes learned to love it (and we learned to hate them for polluting the web with horrendous Flash websites that were inaccessible and useless). Then came Flex, at a time when web apps and Web 2.0 was the wave of the future. Macromedia released an SDK that finally made the power of Flash available  (“leveragable” in biz speak) to developers who wanted to use it.

Microsoft, on the other hand, have wowed developers ever since they took Java made .NET.  Managed code – with the ever evolving C# – allows us  developers to write pure object oriented code from web sites to windows applications. And thank god. I mean, I don’t have much interest in OS programming or the kernel. I’ll let others specialise in that. I’m interested in engaging, interactive applications, in whichever form they take.

Let’s get back to basics. Adobe specialises in cross platform solutions. Microsoft have a vested interest in Windows. 

Adobe has flash advocates (I’m using this term from now on) who were pre Flex (ewww), and post Flex (like me). Microsoft has .NET evangilists. Actually, I’m a good example, cause I’m both. I trained in Computer Science at university. I worked mainly with Java on Solaris machines. When I finished uni, I wanted to write software that people would use. I started with the web because of it’s reach, and have been focused on it ever since.  So now I write Flex and AIR apps that interface with .NET, and I’m happy to look at other RIA technologies as long as they

  • Compile (I’m sorry, but I like the portability of compiled code); 
  • Allow for OO programming (Yes, AS3 is OO – close enough anyhow); and
  • Are portable; and
  • Are accessible.

I think the issue between Flash & Silverlight is all this use of “Company X” evangilist business. Too many religious connotations. No wonder there’s so much passion in this argument. Everyone’s drawing lines in the sand. WTF? Anyone heard of software architecture? The goal is to understand as many technologies as possible to create the best solution for the client – whoever they may be. The platform is just a means to an end. We’ve got to constantly weigh up the options from all sides to create the right system at the right time.  

I’m giving myself a task. Over the coming months, I’m going to investigate Silverlight further, now that v2 allows me to code the frontend in C#, and because .NET 4.0 is looking to integrate the client and server within the single code base. As I go through it, I’m going to post my findings here, for those who want the quasi-objective truth.

what’s the big deal with Flash 10

13 02 2009

Rather than explaining what makes Flash 10 so impressive, here are a few links:

Things are just starting to get interesting.

Flash: Motion Tween vs Shape Tween

6 02 2009

So I was helping my girlfriend last night with a Flash assignment. You know – make a Flash TV remote and what not. (It’s a painful process, esp when you know you could do it in Flex in 5m).

I was going through the basics of animation when I came up to a wall. I’ve always struggling quantifying how to use the timeline and tweening.

It was then that I really realised that Motion tweens requires a Symbol to animate and Shape tweening requires vectors.

Seems a simple conclusion, but still.

So, I wanted a surefire way to teach her how do make the two different animations, regardless of Flash version so here goes.

Motion Tween

  1. Make a new symbol (movie clip) in your library.
  2. Insert a new keyframe in frame 1. (Right click frame 1 in the timeline).
  3. Either drag something into this frame from the library, OR create a new object by using the toolbox and when done, select the frame, right click on the content and choose Convert to Symbol. (Make it a movie clip – see note #2 below). If you jumped to Step 4 without doing this, Flash would automatically convert the objects to a symbol for you.
  4. Now, everything in Frame 1 is a sybmol. Make this frame a motion tween (right click frame in timeline).
  5. Create insert a key frame further down the timeline at some point. Obviously the number of frame should be higher for the length of time the animation should take.
  6. So now, in the frame you created, making a “keyframe” has copied an instance of your symbol. Now wherever you move this instance, the motion is automatically created.
  7. if you want to transform either the start or the end symbol, goto the corresponding frame, select the object, right click and choose free-transform, then do whatever you want to the symbol and see the change.
  8. if you want to change the colour channels of either the start or the end, click the start or end frame, click the symbol, in the properties window you should see the properties of the movie clip – if you see the properties of the frame instead, click the symbol again. Now you can modify the Color (sic) settings at your heart’s desire.
  9. if you want easing of motion, then click on a frame within the motion tween somewhere and the properties window should show the frame properties and the tween. Here you can add a sound, easing, rotation, and even path orientation (that is another topic).
  10. if you want to create another step in between the animation, select some frame within the tween, and either click and drag the symbol somewhere to move it, or simply insert a keyframe up in the timeline.

Shape Tween

  1. Make a new symbol (movie clip) in your library.
  2. Insert a new keyframe in frame 1. (Right click frame 1 in the timeline).
  3. Now because it’s a shape tween, you MUST create some objects using the Toolbox. These could be shapes, or text or brush/pencil strokes.
  4. When you’re happy, create a shape tween on this keyframe. (rightclick in the timeline)
  5. Now insert a frame (not a keyframe) further down the timeline.
  6. Notice the … in the frames? that’s because there’s nothing to tween to yet.
  7. Now, if you want to morph to a completely new shape, you need to Insert a Blank Keyframe in the last frame (or wherever you want it). Start drawing whatever it is that you want, using whichever colours, and transparency needed.
  8. If you want to morph the existing shape, then Insert a Keyframe, and start playing with the shape – free transforming it, selecting parts of it and changing the colour, whathaveyou.
  9. If you want to change the easing of the tween or the Blending, click on any frame within the tween in the timeline, see the properties window has the frame selected, and modify the tween options.


  • Use the Library.  If you didn’t know this then learn it – everything you make should exist within your library and be dragged into the stage or other items so that your library is a collection of your world objects.
  • All new symbols should either be Movie Clip or Button. A graphic is  can be animated in the future if you decide to go down that path. A button is useful for obvious reasons, and you can even import a movie clip onto the button states.
  • If you accidentally create a motion tween on an object you want to shape tween, you will find you can’t make it a shape tween again. This is because Flash converts objects to symbols automatically when a motion tween is applied. You’ll need to either go back (Undo) to before the symbol was created or recreate your object.

flash 10 bugs: fullscreen crashes due to hardware acceleration

27 01 2009

I’ve noticed some issues ever since I installed Flash Player 10 with my Flex apps. Both of which involve fullscreen, and both of which won’t occur if the user disables hardware acceleration.

The first is fairly simple, under Remote Desktop, if you run a Flex app that renders in fullscreen, it will crash every time. This mainly affects users in offices running on thin clients. The workaround for the moment is to disable hardware acceleration. See the bug post here.

The second is more complicated.

Basically, the only way I could reproduce it was to render fullscreen over a HorizontalBox after you’ve fiddled with the box a little. I’ve had it happen over all sorts of components, not just HorizontalBox (even VBox and HBox). Again the principal workaround is to disable Hardware Acceleration. The other workaround I’ve found is to hide the HorizontalBox whilst the user is in fullscreen, and then to turn it back on once they return to normal viewing. See the bug post here.

If these issues have been affecting you, I’d advise you to watch the above bugs and receive updates from Adobe about them.

Both of these bugs have been introduced with Flash Player 10, and both have been with Adobe now for a few months. Hopefully we’ll see these fixed soon.

Getting started with Flex 3 and Flash Media Server 3

4 09 2008

This is a just a brief get up and go starting off with Flash Media Server 3 and Flex 3.

For the purposes of this discussion, I’ll be using Flash Media Development Server 3.

The goal of this post is to have two videos streamed into a Flex app – one a live stream, the other a recorded stream.

What you’ll need:

  1. Flash Media Development Server 3 …. free download
  2. Flash Media Encoder 2.5 … free download
  3. a web cam & a mic

So to start off, you download and install the Flash Media Development Server 3 software.

Once installed, jump into the Flash Media Administration Console to have a look around. Guess what – there’s not much to see yet.

Now install the Flash Media Encoder software.

This will take the streams coming in from your webcam and mic and convert them to video. Whilst it’s running – you have a live stream running in “rtmp://localhost/live/livestream” and if you stop it running, it will save a FLV file in the “My Videos” folder of your user.

So do a short 20s video and stop the encoder. You should have a small FLV sitting in “My Videos” called “sample.flv”. This you can copy to your video-on-demand’s media folder which is under “applications/vod/media”.

Now, start the encoder again but leave it on to generate a live stream.

In Flex, write a small app that has two VideoDisplay controls – one for your live stream and one for the video on demand.

<mx:VideoDisplay source=”rtmp://localhost/live/livestream” live=”true” autoPlay=”true” />

<mx:VideoDisplay source=”rtmp://localhost/vod/sample.flv” autoPlay=”true” />

When you run the app, you’ll see your stream and your video, running side by side.

flash player 9 uninstall woes

19 01 2008

Hmmm…you’re prolly unlikely to come across this one.

For some reason, when I installed Flex, the Adobe Flash Player 9 debugger didn’t work. I followed the steps that Adobe laid out for me but to no avail. I then read that you need to actually use an Adobe uninstaller to remove Flash Player 9. Ohhhhhhhhh.

The uninstaller is here:

And the Flash Player 9 with debugger  is here: