I have 2 buttons to play 2 different parts of a sound, with 3 animations each. For both buttons, Animation 0 (for the normal state) and Animation 1 (for the mouse enters state) have 1 frame, and Animation 2 has 2 frames (for the active or current state). So animations 0 and 1 aren't technically animated.
I have a looping 10 second sound that starts when the scene is created. I have a drawing event that checks the position of the sound. If the sound is within the first 5 seconds, animation 2 of button 1 plays. If it's within the last 5 seconds, animation 2 of button 2 plays. This works perfectly.
I have an on actor event for each button. When the mouse is released on button 1, the position of the sound is set to 0. When it's released on button 2, the position of the sound is set to 5000 (the 5 second mark). This also works perfectly, but that's where I'm stuck.
I can't get the hover state to work, which is Animation 1 for each button. I've tried making regions over the buttons, so when mouse enters the region, hover, or mouse enter (Animation 1) is triggered, but that does nothing as well. I've tried making behaviors instead of events, but I can't choose actors or animations in a behavior, only attributes or last created actor.
Am I going about this wrong? What would you do? Would it be easier to make several sounds instead of getting parts of one sound?
Goals:
- Songs, or parts of one sound play in order and start over when all have played.
- Clicking a song (actor button) stops current song and starts a new one, but songs will continue to play in order otherwise.
- Current song keeps playing on scene change.
- Animation plays on proper button (actor) when corresponding song is playing.
- Hover or mouse enter triggers Animation 1 on actor button (a single frame animation).