Bensmeets.com

Rich Internet, Interaction design and User Experience

Archive for August, 2004

Monday
Aug 9,2004

I woke up one day and decided to switch from developing flash projects AS1.0 style, to the all new and shiny AS2.0 style. Although I was finding myself very smart at the time, I only recently found out there was (and still is) tons for me to learn about developing the new Object Orientated way. Therefor I consider myself lucky having the chance to get my hands on a copy of Colin Moock’s new book ‘Essential Actionscript 2.0’. With the friendly and willing help of a very polite Colin Moock may I add.

The book itself
Before I’ll try to tell you more about the book, let me start by saying this. If you are serious about developing any form of Actionscript based Flash projects, and want to do it ‘new style’ by adapting the new AS 2.0 style… make sure that before you happily start coding, reading other books etc…. .that you read this book first  I cannot stress enough that the understanding of the new language and it’s possibilities/problems/etc. will increase tremendously after reading it. And trust me, it won’t be that much of an effort to get to the last page…  Colin did a great job writing the book. Not only does it give you an absolute point perfect story about the Actionscript 2.0 syntax, it also gives you great examples and theory about how to use this knowledge in everyday projects. The very least you will gain from reading this book, is finally understanding what the great advantages of developing your projects the AS 2.0 way, really are.

The first parts of the book, explain in detail what syntax is used for coding in AS 2.0. Colin makes sure you understand every knob and bolt of the new language, by giving you the examples you need. Besides explanation of this, he uses the different types of feedback which is given by the compiler to let you make mistakes, so you can learn how to recognize and prevent them in the future.
What Colin seems to find extremely important, is the use of datatypes in your application. This can be told by the large number of pages dedicated to the subject, which is a good thing actually. One of the great advantages of AS 2.0 over AS 1.0, is the stronger datatyping supported by the language. Not very usefull in you smaller everyday flash widgets, but trust me you’ll be glad they added it when building the much larger Internet Applications.

Another thing i liked personally about this book, is that it takes the time to explain you the basics (like most books do), but after that also uses those basics to teach you the more complicated things (which many books forget). That is where the later parts of the books consist of. It takes the knowledge you have aquired in the first part of the book about syntax and language specific things, and uses this in the more practical knowledge of ‘and now teach em how to use this in real life please!’. I knew this book was going to be great to read when I came across a piece in the beginning of the book:

“Many people learn the basics of OOP only to say, ‘I understand the terminology and concepts, but I have no idea how or when to use them.’ If you have that feeling, don’t worry, it’s perfectly normal; in fact, it means you’re ready to move on to the next phase of your learning-object-orientated design(OOD).”

When i read this part, a warm feeling came over me and a big smile on my face. It gave me the feeling this guy was going to finally explain me what i really needed to know in my everyday work…….. and he did :). Colin has a way of explaining things in a way that even I understand them. He takes you by the hand If he feels the need to and leaves you hanging in thoughts when he should. In contrast with other books I read which seemed to be a 400+ pages filled with to-do lists, Colin also explains and arguments his decisions and tells you which alternatives you may have. Great objective way of writing which is carried on throughout the rest of the book.

final thoughts
To conclude things. Colin thanks a lot for taking the time and effort to write this great book. It made a lot clear to me and am sure will do the same for many others. Again, thanks for taking personal care to make sure the review copies got where they were promised. Great way to be proud of your own product I say.

Way to go
The final ‘way to go Colin’ points are:
- Nice understandable way of writing. This time, i actually understand all the mumbo jumbo.
- What seemed complicated before, seems extremely logic now. Not that everything is clear, but at the very least a whole lot more then was before.
- By explaining the deeper thoughts behind design descisions of the new AS language, it helps you understand the pro’s and con’s better.
- Very nice to see someone explain things ‘all the way’. Not just a little widget or gimmick. It start with good planning and setup.
- When he makes a descision in his examples, he also explains his arguments why he made such a choice, and even better, gives you alternatives.

Now stop reading this way too short review of a great book, and go buy the thing already. If not, you may want to check out the links below for more info.

More about Colin Moock
Reader reviews
Sample chapter 2
Sample chapter 9
Sample chapter 12

ASO Headaches…. still

  • Filed under: RIA
Tuesday
Aug 3,2004

I tried my very best to take the good advices at hand, and gave the ‘putting my classes on a network drive so everyone can use them’ thing another try. But no matter what i do, how many new commands i download and install, how many internal clocks i alter… i stil can’t get it to work properly.

I have my flash setup with the following classpath added:

W:\Libraries\ActionScript 2.0

Where W:\ Is a network drive.

Furthermore i have a completly empty .fla file, except for the following code on frame 1:

import nl.flashZone.*;
var temp = new nl.flashZone.CMain();

And last but not least, a CMain.as located in W:\Libraries\ActionScript 2.0\nl\flashZone\, containing this code:

class nl.flashZone.CMain {
  public function CMain() {
    trace("TEST")
  }
}

When i compile at this time, everything works fine. Just like it should. The problems arise, when i alter (for kicks, abre with me) the code of Main.as into:

class CMain {
  public function CMain() {
    trace("TEST")
  }
}

Now this should provide a compile time error by flash, and it does:

**Error** W:\Libraries\ActionScript 2.0\nl\flashZone\CMain.as: Line 7: The class being compiled, 'CMain', does not match the class that was imported, 'nl.flashZone.CMain'.
     class CMain {

But when I alter the code of CMain.as back to it’s previous state, it still is giving me a compile time error. Different, but still there:

**Error** W:\Libraries\ActionScript 2.0\nl\flashZone\CMain.as: Line 7: The name of this class, 'nl.flashZone.CMain', conflicts with the name of another class that was loaded, 'nl.flashZone.CMain'.
     class nl.flashZone.CMain {

So i figured ‘That don’t impress me much…’. It did before, but now i can give the new ASO clearing commands a try. But no matter how many times i use the command, the last error still keeps popping up.

I had a couple of lucky shots when fudling with internal clocks of server and developers pc, when suddenly the class would compile, but nothing i can guarantee will work. More luck then wissdom in that case.

Now i’m not writing this to put down on anybody, just to inform others like me who are experiencing the same problems that it might just not be a real error which they should fix by altering the code, but by changing the location of the class files.

Btw, if anyone sees me doing something stupid in above code, please let me know. Always open minded and willing to acknowledge my own mistakes :)