|
-
Senior Member
Unfortunatly, Flash will only allow one object to be roll-overed at a time.
Also, if you nest the hotspots inside the picture, then the hotspots won't receive rollover events at all, because the outer clip eats the event.
In short, Flash does not support nested rollovers which is what you want here.
However, I found a somewhat kludgy work-around, and I'm enclosing a FLA file that demonstrates it.
You nest the movieclips, and then use an onEnterFrame handler to generate a fake rollover event for the inner (nested) clips by using hitTest.
Here's the script. It assumes the outer clip is named mcclip and the inner clip is named mc (or mcclip.mc).
code:
mcclip.onRollOver = function()
{
trace("outer rollover: " + this);
}
mcclip.onRollOut = function()
{
trace("outer rollout: " + this);
}
mcclip.mc.onEnterFrame = function()
{
if (this.hitTest(_root._xmouse, _root._ymouse, true))
{
if (!this.isRollOver)
{
this.isRollOver = true;
trace("inner rollover: " + this);
}
}
else {
if (this.isRollOver)
{
this.isRollOver = false;
trace("inner rollout: " + this);
}
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|