Archive for October, 2008

Creating a product viewer

flash phone selectorWhen you want to create an animation to view your products, the flash player can give you a dynamic and excellent approach to achieving this. This little tutorial will show you the basics of creating an XML-based product viewer which can be reused by changing the content of the XML(of course). I refer to my post Loading external resources in Actionscript 3 in order to load images and How to load XML in Actionscript 3 before reading further. Below you will see the final result of the product viewer and the code to complete this tutorial. Read more »

Flash Player 10 finally released

icon_flash_lg.png

Flash player 10 has finally been released with new and funky stuff. Here is a summery of the new top features from on of their release pages:

  • 3D effects
  • Custum filters and effects
  • Advanced text support
  • Dynamic sound generation
  • Vector data type
  • Dynamic streaming
  • Speex audio codec

Really looking forward to getting the new Flash CS4 in the mail soon…

Error handling in actionscript 3

When writing actionscript you allways forget to add some lines of code which are necessary on either syntax level or runtime level. Once you get the hand of it, you will understand what went wrong even before it happened. Sometimes you can struggle with the one-liner for many hours when the error only was an error so simple. Thats why this little post could come handy. If you should experience errors not described below, please post a comment and I´ll add it to the post. Hope this will help you a bit when pulling your hair.

1009: Cannot access a property or method of a null object reference.
This is a runtime error stating that an object has not been initialized. You can find where the error occurred if you look at the output below the error line. Here is an example of what you might experience:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at ThumbHolder()
at ThumbsContainer() Read more »

Creating symbols and associative classes

When you create symbols in Flash CS3 and export them to Actionscript in the standard way, Flash generates a class representing the symbol. This is great when you want to access the symbol from the code. Every symbol you have created and is located in the library view can be exported to actionscript. If this is new to you, please recap on the article Understanding the use of designer objects in seperate as-file(class).

linkage_associative_class2

When you want to manipulate the symbol at runtime you would want to create your own class for the symbol. Read more »