
I added three buttons to my project 4 animation. One is from the buttons common library. It has action script applied so that it links to the website with a 5 minute documentary about the new album by a band called Galactic.
I created the other two buttons. The first (1) starts the animation. The movie clip applied to the over state is of the button doing a kind of wave to the left and right. This was done with a motion tween distorting the image. The down state looks the same as the up state except the colors are reversed. The last button (2) stops the animation. It has four layers, one each for sound, the yellow stroke, the purple fill, and the text. I changed the line style of the stroke and the color of the fill for the over state. For the down state, the button disappears and is replaced by a larger number zero. The sound clip, applied to the over state, is of former Vermont Governor Howard Deans famous scream during the 2004 primary campaign. However, I did have a problem with sound.
It worked fine when hovering over the button but the clip would play again when the button was clicked, as if there was also a clip placed in the button's down state. I had given up trying to fix it and was writing this when another possible solution came to mind. I applied the same sound clip (though I'm sure it doesn't matte which clip is used) to the hit state but set the sync sound option to stop (it is set to start in the over state). That worked like a charm, almost. If the button is clicked before the clip ends, it stops the clip. I think that is much better than what was going on before.
Lastly, there is no imported movie-clip. I did create one from the heart pulse animation. I also imported it and named the instance per the instructions. But the action script didn't control the animation. It started automatically and looped continuously. Strangely though, the IK animation did start and stop when the buttons were clicked. So I deleted the movie-clip. I also had a little problem with stopping the timeline. The code, the stop command placed in the last frame, worked as it was supposed to. But the play head remained in the last frame. So when the start button is clicked again, the play head jumps to the first frame and stops due to the action script pausing the movie on the first frame. This meant clicking the start button twice to play the movie again. I changed the code to "gotoAndStop(1);" which solved the problem.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.