Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to attach onMouseOver event to clip??

Status
Not open for further replies.

AtomicChip

Programmer
May 15, 2001
622
CA
Here's my code (AS2.0 within a class):

Code:
class MouseOverButton extends UIComponent
{
//...
private function createChildren()
{
    this.createEmptyMovieClip("mc_off",0);
    this.createEmptyMovieClip("mc_on",1);

    this.mc_off.onMouseMove = function()
    {
        trace("foo");
    };

    this.mc_on.onMouseMove = function()
    {
        trace("foo");
    };

    invalidate();
}
//...
}

Any ideas why neither of the onMouseMove events are triggered? If I substitute this.mc_on.onMouseMove for this.onMouseMove, it works fine - but I don't want the onMouseMove for the parent clip, I want it for the child clip...

Any ideas?

Thanks

-----------------------------------------------
"The night sky over the planet Krikkit is the least interesting sight in the entire universe."
-Hitch Hiker's Guide To The Galaxy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top