PDA

View Full Version : no event bubbling through animated bitmaps



kkos
January 24th, 2008, 08:36 AM
bubbling events through a hierarchy of nested DiplayObjects works in many cases but
unfortunately it does seem to work not in all cases:

Given some nested Objects like so:

box = new Sprite();
box.addChildAt(containerA,0);
box.addChildAt(containerB,1);
box.addChildAt(containerC,2);

whereas containerA has some "clickable" Objects inside.

If containerB/C contain bitmaps, for instance, the event bubbling works.
But if containerB/C contain a bitmap with a bitmapData which is manipulated via setPixel
or other pixel changing methods, there is NO event bubbling any more.

My first guess was that has something to do with lock() or unlock() the bitmapData, But it hasn't.

Does someone know why there is no event bubbling in such a case :q:

Keith

kkos
January 24th, 2008, 10:02 AM
Sorry for bothering you with the details above. I made a mistake and did not realize it.:ne:

The event bubbling works only within a displaylist of parent-child related objects.
In my case i added an child to one of the displaylist objects. In that moment, this displaylist Object with its new added child has an own displaylist with a parent-child relation.

What i did not expect was, this, say "sub-displaylist", breaks the event bubbling !
For instance:

box = new Sprite();
box.addChildAt(containerA,0);
box.addChildAt(containerB,1);
box.addChildAt(containerC,2);

=> event bubblings only works, when the container B/C have NO childs itself.

So, the next question for me is, is there a way to bypass Displaylist Objects during
the event propagation ?

Keith