Category Archives: ActionScript 3
Working with superclass methods
The superclass constructor In this post I will explain how to invoke superclass constructors and how to override superclass methods. Let’s start with the superclass constructor: package { public class ParentClass { public function ParentClass():void { trace("Constructor of ParentClass executed"); … Continue reading
How to remove a specific item from an array
To remove a specific item from an array we use the array’s splice method: function splice(startIndex:int, deleteCount:uint, … values):Array startIndex: The first item to be removed deleteCount: The number of items to be removed values: is optional and allows you … Continue reading
Remove all children from a Sprite
There are other ways to remove all children of a Sprite, but for me this is the smartest solution: while(mySprite.numChildren > 0) { mySprite.removeChildAt(0); }
Unable to resolve resource bundle “CairngormMessages” for locale “en_US”
I get this error every time I start a new flex project with cairngorm. Because I don’t want to google this anymore, I write the solution down. Just add the following compiler argument and it should work. -source-path+=locale/{locale}
Mouse Interaction in Papervision 2.0
Events in Papervision are InteractiveScene3DEvents. You can add event listeners for InteractiveScene3DEvents to any DisplayObject3D or to the InteractiveSceneManager of Viewport3D. The interactive-property of a DisplayObject3D´s material must be true to make the object interactive. The interactive property of your … Continue reading