(oops, man it's early, it's AS2... bleh..) When you add a rollover to a parent, it blocks all children of that mc from receiving rollOver calls since it is a part of the mc who's already received that call. So what I do is create a hitTest for the parent and then a onRollover for the children.
hth (now back to my coffee) On 8/24/07, Bob Wohl <[EMAIL PROTECTED]> wrote: > > just a stab as I am not that AS3 savy, but wouldn't you want to run a hit > test against the parent and rollover on the children? Just a guess. > > > On 8/24/07, Alexander Farber <[EMAIL PROTECTED]> wrote: > > > > 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'); > > } > > } > > _______________________________________________ > > [email protected] > > 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 > > > > _______________________________________________ [email protected] 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

