Hello,
I have a grave problem and help is much appreciated. I have a MC, and made it behave like a button:
b2.addEventListener(MouseEvent.MOUSE_OVER, mOver);
b2.addEventListener(MouseEvent.MOUSE_OUT, mOut);
b2.addEventListener(MouseEvent.MOUSE_UP, mUp);
b2.buttonMode=true;
b2.mouseChildren=false;
(example of one instance of the MC called b2)
Now I need to add a dynamic textfield on top of it. The problem is this text field is not “clickable” and you do not get the hand icon when you hover. So…
-
I tried embedding the dynamic text field inside the MC. This fixes the problem but creates another one: I use the MC in several places and I “skew it” for effect…the text comes out skewed…I need the text to remain intact
-
I tried placing a transparent MC on top of all this to act as a “hit area”. Named it tb2 and used:
tb2.addEventListener(MouseEvent.MOUSE_OVER, mOver);
tb2.addEventListener(MouseEvent.MOUSE_OUT, mOut);
tb2.addEventListener(MouseEvent.MOUSE_UP, mUp);
tb2.buttonMode=true;
tb2.mouseChildren=false;
problem is, inside the event handlers MOUSE_UP,over…etc I use the event.Target to take some action. Well now the target is not the original MC and code errors out.
Anyway to fire an event on behalf of another MC? So event.Target points to the other MC?
Any ideas much appreciated. I am really stuck!
Thanks
Skimo