FORUMS: list search recent posts

How do I access Timeline sounds from Actionscript?

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Aaron Babcock
How do I access Timeline sounds from Actionscript?
on Oct 4, 2011 at 10:37:29 pm

How do I access Timeline sounds from Actionscript? The sounds have to be in the timeline for my current animation, as the animation is timed to the sound. But other parts of the animation need to react to the sound's amplitude via actionscript 3. Is it possible to do this? Thanks,

--Saib


Return to posts index

demetri tashie
Re: How do I access Timeline sounds from Actionscript?
on Oct 5, 2011 at 5:07:35 pm

embeddeding sounds in the timeline limits your ability to work with those sounds. Much better to work with the Sound Class

however, for timeline embedded sounds you can at least do simple things like manipulate the volume , and pan working with the SoundMixer class. this will of course effect all sounds playing.

you would control the SoundMixer like this:

SoundMixer.soundTransform = new SoundTransform( .5, -1);

where the first parameter ( .5 in this example) controls the volume , and the second, the pan value ( -1 being full left and no right channel ).

if you need to trigger events based on the amplitude of the sound, i am not sure that that is possible directly from timeline embedded sounds. it is possibly better to trigger those events based on the frames from which they occur.

choosing to use library sounds instantiated with the Sound Class, you can actually get to the sound wave properties and access amplitude info. i've done this( a while ago) to make sound waveform visualizers, but not much else.

hope that helps


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]