Hello,
i used the code on
http://proto.layer51.com/d.aspx?f=838 but i have some problems.
I placed this on main timeline in Actions Layer:
Key.addListener(Key);
Key.onKeyDown = function(){
var dwn = String.fromCharCode(this.getAscii());
if (dwn.length) this.broadcastMessage("onKey"+dwn+"Down");
}
There were to places where i wanted to check is a key is pressed: in MC1 and MC2 both placed in main timeline.
So in MC1 i placed this code in Actions layer:
Key.addListener(this);
this.onKey1Down = function(){
_root.MC2.gotoAndPlay("start");
}
And in MC2 i placed the following code:
Key.addListener(this);
this.onKey1Down = function(){
_root.MCFast._alpha=100;
}
What seems to happen is that when flash is in MC2, and i press 1 both actions take place:
_root.MC2.gotoAndPlay("start"); and
_root.MCFast._alpha=100;
Can u tell me what is going wrong? I also tryied to understand the code but i am having some problems in doing it.
Thanks,
Miguel