Adobe Education Store

MovieClip mouseChildren

by admin on December 20, 2007 · 1 comment

in Flash CS3, Tips and tricks, Tutorials

Here we are with a new tip of the day.
After seeing the difference between target and currentTarget , after analysing the property dropTarget , today we will look at the property mouseChildren of the DisplayObjectContainer Class.

This property is used with MovieClip, Sprite, Loader and Stage.
Why???  Because, the DisplayObjectContainer Class is a super Class of Loader, Sprite and Stage.  It means that those classes inherit the methods and properties of the DisplayObjectContainer.  The MovieClip class, instead, is a subclass of Sprite so inherits its methods and properties from it.

What is so special about the mouseChildren?
Simple, it can help us resolve one problem.

As an example, let us say that we have a MovieClip containing more objects (ex: a text field) and that we want the mouse to interact with that MovieClip.
We add the needed listeners and realise that when the mouse is above the MovieClip it does not transform itself into the ‘hand’ pointer.  In fact, it would do so, only if the mouse is above one of the MovieClip’s object such as the text field.

Now, it is time to act on the property mouseChildren, the following way…

Read all

Share This Post

Related posts

{ 1 trackback }

Flash - Button Component Mauszeiger auf Pointer setzen : TheJaeck
05.27.09 at 7:08 pm

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Older post: indexOf method of Array class

Newer post: Mini Navigator