EventListener EVENT.ENTER_FRAME as we all know is useful to trigger function you want to check up on conditions for a indefinite period of time. e.g. A check for game over state in a flash game. However, to control the flow of the your flash projects, usually we build only one of these and employ it to the stage trigger various function to have a better control over the code.
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.publicclass docClass extendsMovieClip{publicfunction docClass(){trace("Class Loaded Successfully");
}}}
Hmmm, interesting. I was playing around with Adobe tweening classes just last week. These tweening classes are the default ones found in CS3 (Note this is not the open source ones, as listed in this post here)
Here are the sample tweener class of motion tween-y and fade effect in action. (we are going to move the movieClip up and down and with the fade effect altogether).
Today’s tutorial is a bit complex, but it solved a lot of issues faced by flash developer in AS3.
We will be touching on various subjects such as: -
Creating xml schema of your own.
Easier way of doing xml data retrieval AS3 style.
Loads the xml data into Listbox class.
NOTE : Listbox or List is a component in Flash so, it needs a separate import and special event Listener for that. You will get an error if you try to apply regular addEventListener like MouseEvent to it.
Today we are going to talk about the infamous Blue Screen of Death or known for short as BSOD. Microsoft named them as Stop errors designed to safeguard the system if the system encounters condition that compromises safe system operation. Ironically, I dont feel much of a pain when I was diagnosing BSOD for third party pcs however, I can get extremely desperate and frustrated if that BSOD happened to me.