tototototototot

All posts tagged displayobject

getBounds() on DisplayObject not functioning properly

Well in fact, it is… or is it not ? depends on how you see it. The trouble If using masks or objects that have their “visible” property on true but “alpha” at 0.0, it is taken into account into the calculation of the bounding rectangle. Even objects that are outside of the masked area […]

Filters Manager in AS3 (BitmapEffects Manager) or how to add, remove and modify a filter from a DisplayObject

First of all, to understand the need of a centralized manager for filters in flash, we need to understand how filters are set on a DisplayObject. To set a filter, we first need to create a BitmapFilter object : [sourcecode language=’as3′] // create a new blur filter var blur:BlurFilter = new BlurFilter(4.0, 4.0, 1); [/sourcecode] […]

Common mistakes when using hitTestPoint function of a DisplayObject

hitTestPoint is a very usefull function when you want to test if a point (x, y) hits a shape, even an irregular one. But there are a few but important things that you got to remember to get it to work properly: the dispay object you’re working on must be added to the display list. […]

Rotate a MovieClip/DisplayObject around a point

This is something I have been looking for for a couple of hours. When I finally found out how to do it the way I needed to do it, I stepped on a blog explaining that a function actually exists for that specific need (see http://jobemakar.blogspot.com/2007/06/rotating-around-point.html) This function is part of the fl package (comes […]

Strange behavior with masks in Flash CS3 (and 10)

Here is the case: I have one MovieClip called “container” that holds several other MovieClips. Each one of these MovieClips have a dropshadow filter applied to them. The “container” mc is masked by a shape on the timeline and one can scroll up and down this mc via a scrollbar. Well, now it seems that […]

Stage accessibility, avoid errors when trying to access it

Be aware of the stage property of a DisplayObject instance (any class that can be added to a Display List in order to be shown on screen). It is only accessible when the instance is added to the Display list. I went into some troubles when trying to add an event listener on the stage […]