Hello,
I am creating something like a button but from a MC (region is the MC):
region.addEventListener(MouseEvent.CLICK, region_Click);
region.addEventListener(MouseEvent.MOUSE_OVER, region_Over);
region.addEventListener(MouseEvent.MOUSE_OUT, region_Out);
} // Mark regions
// region_Click
function region_Click(e : MouseEvent) : void {
var url : String = 'http://www.mydomain.com/region/' + (e.currentTarget as MovieClip).id;
navigateToURL(new URLRequest(url));
} // region_Click
// region_Over
function region_Over(e : MouseEvent) : void {
var tween:Tween = new Tween(e.currentTarget as MovieClip, "alpha", Strong.easeOut, 0.7, 1, 2, true);
} // region_Over
// region_Out
function region_Out(e : MouseEvent) : void {
var tween:Tween = new Tween(e.currentTarget as MovieClip, "alpha", Strong.easeOut, 1, 0.7, 2, true);
} // region_Out
I have two problems:
-
When I place the mouse over the icon does not change to the hand as expected … Is it possible?
-
Over the MC I have another MC, MC2. When I place the mouse in a position which is over MC and MC2 is like the mouse is out the initial MC.
How can I “fix” this?
Note:
Should I make my MC a button instead?
Can I have my code working if it would be a button?
And if using a button can I disable it if needed?
Thank You,
Miguel