Can
You Synch Audio in LiveMotion SWF Files?
[Page 2 of 2]
6. Select
the Normal state in the rollover palette. Normally you can't get
behaviors to be triggered by the Normal state. But you can get
the Normal state to change its own state into another, and that
other state can take on any behavior. Sound weird? It is. But
it's the way you have to do it for now. So, in the Normal state,
click the Edit Behaviors button. Then add the "Change State"
behavior with a target of Trigger and a state of Bye, as in the
illustration below.

7. So the
concept is that as soon as the Trigger object loads, which coincides
with the last frame of the audio track, it switches itself to
its Bye state. So now you can set the Bye state to trigger anything
you want. For example, you could simply add the Stop behavior
and target that at the composition, which will make the whole
animation stop. Or it could trigger a fade to black or whateverbasically
any tricks that you might pull with a mouseover, except this will
be automatically triggered (no user interaction) at the last frame
of the audio.

Once you get
this concept, it's easy to see how it can be done in reverseto
get the end of an animation to trigger the end of an audio file.
There is, however, one key difference. When you stop an animation,
you can easily force your composition to fade to black (or white
or whatever). I'm not going to go into this technique here; I've
explained it many times in other tutorials and in the LiveMotion
forum. But with audio, you can't just "cover it up"
by controlling a sound's opacity, as you would with graphics.
No, there
are really only two solutions that I can see. You either trigger
a Stop All Sounds behavior, or your trigger Stop All Sounds and
cover up the abrupt ending with some sort of conclusive sound
effect or drum lick or something like that.
The way it
works is to take your longest animation track (or the one most
likely to run long) and group it with a second Trigger object,
just as you did with your audio track. Your Second Trigger object
would similarly have two statesNormal and Byeand the
Normal state would automatically switch to the Bye state, which
would then trigger the Stop All Sounds event as well as a secondary
event, such as playing your conclusive sound effect.
One note on
this: I've noticed that when combining the Stop All Sounds behavior
with a behavior that plays another sound, it's best to have the
Stop All Sounds behavior LAST in the list. This seems counterintuitive,
but it's the only way I've been able to get such a contradictory
set of behaviors to function properly.
Now, this
is, as advertised, a pretty sloppy way do do it. But I've been
asked, and there's the answer. If you have any further questions
or need clarification, please visit us in the Adobe
LiveMotion forum here at Digital Media Net. Please also share
any alternate ideas (besides the obvious one) for handling these
sorts of situations.