Archive for the 'AS3' Category

Editable Multi-TextFields container

gskinner has reveiled a library that lets you create several textfields and make them “interact as one” when selecting and/or changing the aspect height. Even though he describes his code to be bugsy and not to the quality standard of what he wants, it seems to work great. Think about the areas where flash has been lacking when talking about text on the web. When Google and Adobe for many months ago started working out the little hicks on searching inside flash content, the TextFlowPro is a great supplement to the flash world. Hands in the air for gskinner. Head on over to gskinner’s blog and get your hands on the source code.

TextFlowPro

FLARToolKit(as3) with Papervision3D = Awesome application

I just found a demo on Ryan Stewart’s blog from MAX in Japan about a Augmented Reality application library ported to actionscript 3. Really impressive stuff. FLARToolKit is a library in the SPARK Project and is basically a shape recognizer with the video camera as input. The toolkit is ported from the java based NyARToolKit which accordingly to the Spark Prokject website executes much faster then the original C version.


FLARToolKit Demo from Ryan Stewart on Vimeo.

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 »

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 »

Next Page »