Hello!

I have a MovieClip representing a player avatar.
When the mouse pointer is over it, I change its
filters from containing a shadow to a glow.

Then I have a MovieClip representing a playing
table and it works the same way.

My problem starts when I put 3 player MCs
on 1 table MC - then suddenly the player MCs
stop working and do not react onRollOver:

    http://preferans.de/flash/Ellipse.swf

I have (done my homework! :-) and
prepared a simple test case here:

  http://preferans.de/flash/Child.as
  http://preferans.de/flash/Parent.as
  http://preferans.de/flash/TestParentChild.fla
  http://preferans.de/flash/TestParentChild.swf

and I'll copy that test code at the bottom of
this mail as well (for the archives). It has the
same problem - when a child MC is placed
on a parent MC, then it stops printing "child".
Only "parent" is printed. Any idea why?

Regards
Alex

PS: Here is my test code:

class Child extends MovieClip
{
        var rect_mc:MovieClip;
        
        function Child() {
                rect_mc = this.createEmptyMovieClip('rect_mc',
                    getNextHighestDepth());
                with (rect_mc) {
                        beginFill(0xFF0000, 100);
                        lineTo(0, 20);
                        lineTo(20, 20);
                        lineTo(20, 0);
                        endFill();
                }
        }
        
        function onRollOver():Void {
                trace('child');
        }
}


class Parent extends MovieClip
{
        var children:Array;
        var rect_mc:MovieClip;
        
        function Parent() {
                rect_mc = this.createEmptyMovieClip('rect_mc',
                    getNextHighestDepth());
                with (rect_mc) {
                        beginFill(0x00FF00, 100);
                        lineTo(0, 100);
                        lineTo(100, 100);
                        lineTo(100, 0);
                        endFill();
                }
                
                children = new Array(3);
                for (var i:Number = 0; i < 3; i++)
                        children[i] = rect_mc.attachMovie('Child',
                            'child' + i + '_mc',
                            rect_mc.getNextHighestDepth(),
                            {_x: i * 30, _y: 0});
        }
        
        function onRollOver():Void {
                trace('parent');
        }
}
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to