I have a sprite with 10 animation frames and I have 10 copies of he sprite each set to a different initial frame .
When I click on any sprite , I want a different music file to play . I have the names of the music files stored in an array and I am using <sprite name>.animationframe to identify which element of the array contains name of the music file to play.
Using "pick instance with UID Function.Param(0)", I can identify the clicked on sprite for flash / rotation resize etc effects & the music associated with all frames plays , but I also hear the music associated with the first frame , along with the music for individual other frames.
I sorted the part where music of first sprite plays with the music for others by setting the "mute effect " to the music file for the first sprite, but now I want to remove the mute effect when user cliks on the first sprite.
This led me to think I need to know the <sprite name>.AnimationFrame which will give the music file to conditionally mute/unmute a music file.
Somehow when I set a text box text to <sprite name>.AnimationFrame, it always shows the value "0" being the initial frame of the first sprite.
I need to get numbers like so -
2 when I click on 3rd sprite,
0 when I click the first sprite, ,
5 when I click the 6th sprite so that the music associated with the first sprite doesn't play alongwith others, but plays when the first if clicked.
What am I doing wrong ?