I have 3 insances of the button component on stage named 2_btn, 3_btn and 4_btn.
They all are broadcasters and have been initialized.
I want them to broadcast an event and pass a variable along each time they are pressed.
This code is attached to frame of main timeline
this.2_btn.onRelease = function(){
broadcastMessage("onBtnPressed", 1);
}
_root.3_btn.onRelease = function(){
this.broadcastMessage("onBtnPressed", 2);
}
4_btn.onRelease = function(){
this.broadcastMessage("onBtnPressed", 3);
}
Now i’d really like to know why do i get these errors :
**Error** Scene=Scene 1, layer=actions, frame=1:Line 11: Syntax error.
this.2_btn.onRelease = function(){
**Error** Scene=Scene 1, layer=actions, frame=1:Line 14: Syntax error.
_root.3_btn.onRelease = function(){
**Error** Scene=Scene 1, layer=actions, frame=1:Line 17: Syntax error.
4_btn.onRelease = function(){
I use flash 8 and AS2.
thanks for helping out