Contents |
|
Controlling the Timeline | Adding JavaScript |
This tutorial assumes you have a basic understanding of this software.
Create a new movie. Add a sound to the library, this example uses Beep.mp3.
Click to save this sound to your computer.
Add a button to the library and change the text to beep.
Drag the button onto the editor.
Select the button in the library and change the 'On Click' script to:
Click 'Play' to test the button. It should beep when you press it.
![]() | Play |
Create a new movie and add the Beep.mp3 sound to the library again. This time create any 20 frame animation you like. We've added a regular shape that moves from left to right.
![]() | Sound |
Click the menu for Beep and choose 'Add To Timeline'.
The sound is added to the timeline. A play symbol shows that the sound will be played at this frame. You can change the properties of the frame so that the sounds loops or stops.
Note: The sound will start playing from the beginning, even if it's already playing.
Click 'Play' to test the Movie. The animation will play and the sound will play every time if passes frame 0.
![]() | Play |
Create a new movie like the last example. This time add a long sound, we use JazzLoop.mp3 in this example. Again create any 20 frame animation you like.
![]() | Sound |
Click to save this sound to your computer.
In the properties for the sound in the timeline, choose 'Loop'.
The sound is longer than the duration of the movie. When you play the move, notice that the sound restarts every time the movie passes frame 0.
To solve this problem. In the movie properties, turn off 'Loop'
Then set the 'On End' script to:
Click 'Play' to test the Movie. The animation will play and the sound will play and loop. When the end of the movie is reached, it returns to frame 1 avoiding the sound in frame 0, so the music doesn't restart.
It is currently impossible to play sounds on the iPhone and iPad without user interaction. This means a button needs to be pressed to play a sound. However, once a sound has been played, the sound will play again without any other user interaction being required.
To solve this problem, create a new movie, add the JazzLoop.mp3 sound and a button. Change the text of the button to Start and add it to the editor at frame 0.
Turn off 'Auto Play' in the movie properties.
Set the 'On Click' script of the button to:
When the movie plays, it waits for the button to be pressed before it continues to frame 1. The music will then play in the background on a loop.
Controlling the Timeline | Adding JavaScript |