Copy link to clipboard
Copied
Copy link to clipboard
Copied
i dont know
please you telme where to place it
Copy link to clipboard
Copied
the code i suggested has var i declared in the first for-loop
Copy link to clipboard
Copied
did not get it
where do i place please
Copy link to clipboard
Copied
var sound_mcA:Array = [sound1_mc,sound2_mc,sound3_mc];
var buttonA:Array= [b1,b2,b3];
for(var i:int=0;i<buttonA.length;i++){
buttonA[i].addEventListener etc
}
function f(e:MouseEvent):void{
var j:int =buttonA.indexOf(e.currentTarget);
for(i=0;i<buttonA.length;i++){
if(i==j){
sound_mcA[i].play();
} else {
sound_mcA[i].stop();
}
}
}
Copy link to clipboard
Copied
done
but gets error
Copy link to clipboard
Copied
i made the graphic symbols.........and put the name of them in the code but apears this
they are in library
Copy link to clipboard
Copied
those need to be instance names.
Copy link to clipboard
Copied
i know the instance of a button
but not from a graphic symbol
how do i know that
thanks
Copy link to clipboard
Copied
i got it
ill try now
Copy link to clipboard
Copied
i named the instance sheet1 and sheet2
and happens this...below ... take a look at the graphic...there is a instance named sheet1 for example
Copy link to clipboard
Copied
pick different names
make sure there are no lead/trailing spaces
Copy link to clipboard
Copied
i am trying.......happens the same
what is lead/trailig spaces ?
Copy link to clipboard
Copied
a space before or after the alphanumeric characters
Copy link to clipboard
Copied
i give up
it did not work
Copy link to clipboard
Copied
whats your opinion about it
Copy link to clipboard
Copied
in the properties panel, change graphic to movieclip for both sheets
Copy link to clipboard
Copied
now its gettin error with the button of the graphic(movieclip now)... the instance is right i dont know why its happening
Copy link to clipboard
Copied
change your buttons to buttons or movieclips
Copy link to clipboard
Copied
the problem persists in button now
Copy link to clipboard
Copied
play1?
Copy link to clipboard
Copied
play1 is my button
Copy link to clipboard
Copied
they need to be on the main timeline
Copy link to clipboard
Copied
ok ill try
Copy link to clipboard
Copied
it got static
does not move the line of the sheet music and theres no sound
there s no erros anymore
but does not work
Copy link to clipboard
Copied
what now