Archive for October, 2008

ActionScript 3.0 : Common Errors - Number 5000

Over the weekend, I was rushing for some project of mine coding some AS3 package and I kept getting errors that goes like … “Error 5000 : The Class “xxx” must subclass “flash.display.MovieClip” since it is linked to a library symbol of that type” ; as much as I love AS3.0, it is frustrating sometimes to encounter error which didn’t help users to locate or fix the bug. I hope things will be better in the upcoming CS4.

 

Two possible situation as listed below.

 

1. Forget to import flash.display.* which is necessary for all display objects on stage.

Flash Actionscript IDE does not debug or trace for errors on real time coding so, most of the time the programmers will forget what’s happening.

 

2. Do not add function Brackets for Class

This is very common but surprisingly this is the most common mistake I do every time I script a package document class. Note: This error is hard to spot as the class is very near to the method functions. Just remember the syntax no function like brackets for class. e.g. like samples below :-

 

package{
//REMEMBER : Add import associated with the display.
import flash.display.*        
 
//REMEMBER : class does not have () like method functions.
      public class docClass extends MovieClip{
	      public function docClass(){
		     trace("Class Loaded Successfully");
	      }
      }
}

IPOD Touch Tips and Tricks : Need More Generic Album Art

Just last month, I was rushing to compile my favourite 80’s song and later I noticed all the albums does not have an album art for it. How do I create a generic album art? Simple - there’s actually a lot of sample album art inside your iTunes installation folder. All you need to do is to browse the folder called X:\Program Files\iTunes\iTunes.Resources (Where X is the drive you installed your iTunes into) and take a look at the sample of graphical generic album art you get.

To fit the album art into your compilation, first start iTunes and open up your playlist. Shift click and select all the songs you wanted to compiled as one album under one album art for e.g. My Classical Collection 2008. Simply edit one of the selected album in the playlist (while songs are selected, rename just one and all the selected file album will be renamed accordingly). Next you may want to assign an album art for it by dragging images from the folder which I’ve mentioned to the album artwork section in ITunes located at the left hand corner.

 

genre-classical genre-hiphop 

genre-blues genre-classicT

genre-world genre-soundtrack