Game Development Reference
In-Depth Information
The Timeline is chained to itself. If it isn't, it won't loop. This means if the
Timeline is initially off-screen or otherwise not visible, it may have already
played its animation once and then stopped.
If an animation is playing once but isn't looping, try doing the following:
Check that the Timeline is chained to itself. Perhaps it's not chained or it's
chained to the wrong Timeline.
If an animation does not play its sound effect or does not run its Callbacks selector, do the
following:
Verify that the root node of the CCB containing the Timeline is not removed
from the scene ( removeFromParent ). As soon as you remove the root
node, it will stop playing its Timelines as well as the Timelines of its child
nodes. If the Timeline doesn't animate anything, keep in mind that Timelines
need an active node to run on.
Audio Playback Issues
If you play back audio programmatically, sometimes the audio won't play. Here are a few
things you should check:
Verify that the path and file name are identical, including the use of upper-
case and lowercase. It's easy to forget that you have to specify the folder as
well—for instance, @"Audio/effect.m4a" .
Consider that the audio file extension may change during publishing. For ex-
ample, if the input files have the .wav extension, the actual extension will be
.caf or .m4a , depending on whether the audio format was set to CAF or
MP4.
Audio that you didn't create may be corrupt, it might not adhere to the spe-
cifications of the format, or it might contain unusual metadata. Audio players
are much less picky than OpenAL and AVAudioPlayer, so the sound may
play fine on the desktop. To test this problem, open the affected audio file
with Audacity and re-export it to the same format or a different (.wav)
format.
Search WWH ::




Custom Search