Home > ActionScript, Flash, Framework, General, WorkFlow > Things I learnt recently

Things I learnt recently

For the last few months, I have been experimenting and playing a lot with different techniques and code frameworks just to improve my Flash/ActionScript skills overall.

Stuff like SWC compilation, creating code-snippets are not something new and people have already mastered these arts but as I feel very new in Flash world and as I feel there is a lot for me to learn, I thought I should share some the things I recently discovered.

SWC compilation

I have been using (and still use) Flash Professional IDE as my main development IDE for project compilation for the last three years or so but recently I had a little chat with one of my seniors (Philip Bulley, the guy who got me going in Flash) about the different ways of compiling a SWF file. I had my arguments (typically because I was in my comfort zone using Flash IDE) but he convinced me as always to adopt to ActionScript-only projects so I can just use Flash IDE for assets creation.

Reasons like fast compilation, adding wrapper on top of classes whenever need be (since in Flash, if you have a movieclip structure in place and later on you feel there is a need to change/alter it, it is very difficult) and a pure Object-Oriented feel (instantiation of assets, removal when done) were good enough for me to give it a thought. I am looking forward to feature projects which will certainly be based on ActionScript-only approach using FlashDevelop.

FlashDevelop’s code snippets and code generation

Everyone knows about the usefulness of code snippets and if these snippets are quickly accessible, what else do you want. In my classes, most of the public functions (after implementing an Interface) are same and I use to write them and indent them and comment them again and again. Too be honest, after exploration of code snippets in FlashDevelop, I feel like I have been so stupid. Trust me, whichever your ActionScript Editor is, create and store your little gems, and use them as needed as all of the editors come with this feature of storing snippets.

AS3Signals

Oh Robert Penner, I owe you for that one; you are the man :). AS3Signals is simply fantastic. With different tests showing the speed of this event mechanism and a presentation and a video tutorial showing how easy it is to use Signals, there is no reason ActionScript Developers should give it a try. Lot can be (and has been) said about as3signals, but I will keep it for you to explore. Oh and btw, an enhancement to as3signals is going on as well which, to be very honest, is going over my head. :)

formatString function

I just didn’t know how handy could … rest really be before I got into this situation (i.e. formatString function). Check this little function I created out of curiousity. Little things matter a lot sometimes.

Casalib ActionScript Library

I downloaded CASALib quite a while ago and the utility functions (the ones I have used so far) are very handy in everyday projects. Everytime I google for some helper class, I find it under casalib library, right under my nose.

Look at Inactivity class of time package for instance, wouldn’t you want to decrease stage’s framerate when the user is idle for some time (i.e. the mouse is not moving at all), I would, on all projects actually. Essentially, it is a matter of adding timers and checking if the last mouse position is equal to the new position, but who would do that if someone has already done that and with additional functionality. So, kudos to Casalib for a great package of useful classes.

FlashPlayer 10 3D

I am done with it. I am done playing with FlashPlayer 10’s 3D capabilities. Oh! why did I develop two projects using it, I should’ve used Papervision3D.

Anyways, I will give any external 3D library a try on my next 3D-based project.

That’s it. There is obviously a lot that I need to learn and master and I will Insha Allah.

About these ads
  1. March 9, 2010 at 4:00 pm

    Hey nice tips Tahir, how’s Phil by the way? havent heard from him since last year

    • March 9, 2010 at 4:09 pm

      Thanks Rahmat bhai.

      Phil is doing good, he does his projects in PureMVC these days. Had this long chat with him about SWCs and all.

      TA.

  2. March 9, 2010 at 6:37 pm

    hey rahmat!! we should catch up on msn sometime!

    loving CasaLib Tahir, had never looked into it before. Thanks for tweeting about it, it’s utils package is awesome!

  3. March 10, 2010 at 2:49 pm

    Here are my most used snippets in both FDT and FlashDevelop flavours. These insert a trace tagged with the enclosing class and method. You might remember that I like to put “exec” traces when a method executes and ” – ” traces anywhere else within the method.

    FDT:
    Template Keyword: “texec”
    trace(‘exec ${enclosing_type}.${enclosing_method}: ${cursor}’);

    Template Keyword: “tinside”
    trace(‘ – ${enclosing_type}.${enclosing_method}: ${cursor}’);

    Flash Develop:
    Template Keyword: “texec”
    trace(‘exec $(TypName).$(MbrName): ‘ + $(EntryPoint));

    Template Keyword: “tinside”
    trace(‘ – $(TypName).$(MbrName): ‘ + $(EntryPoint));

    • March 10, 2010 at 2:57 pm

      Yeh I remember that :). Infact, I have created something similar for FlashDevelop code-snippets for public and private functions:

      for a private function:
      private function $(EntryPoint) ( ):void$(CSLB){
      trace ( ” );
      }

      for a public function:
      /**
      * Public function, use it to initialise the class
      */
      public function init ( ):void
      {
      trace ( ‘$(EntryPoint).init’ );

      }
      /**/

      I have even set my most used conditional/loop statements to my ease (i.e. if, if-else, for loop etc). Snippets are so much fun and coding becomes so fast.

  4. March 20, 2010 at 6:25 am

    Thanks Tahir, glad you like Signals. There are now many examples in the Flash community now. I compiled a list of 24 Signals examples in the wiki:

    http://wiki.github.com/robertpenner/as3-signals/community-examples

    Enjoy!

    • March 20, 2010 at 11:28 am

      I am honored to have you here Robert. Honored big time. Please keep new stuff coming our way.

      Thanks a lot again.

      – Tahir.

  1. June 10, 2010 at 9:20 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: