LiveMotionCentral - A Resource Site for Adobe LiveMotion

 Getting Started
 Dynamic Content
 Player Scripting
 App. Scripting
 Additional Utilities

 LiveMotion™ 1

 Add a Tutorial

more »

Latest News

 LiveMotion 2
 GoLive 6
 News Letter
more »
Panning Sound LiveMotion 2.0 Advanced  
  By: Simon Dabkowski Email: URL: 02.28.2002  

The following quick tutorial will enable to create a panning effect with your imported sound object. Keep in mind that controling both volume and pan via actionscripts only works with sounds that are either event or solo event. It will not work with streaming sound objects. in any case, lets get started.



1. Import a new sound file onto your composition and set it as an event sound in the Properties Palette. Adobe LiveMotion 2 enables you to import wide a variety of file sound formats including AIFF, WAV and even MP3s. There are tons of free sound loops out there. One good source is

2. Select your sound object once more and convert it into a (MC) Movie Clip object. Rename the object to 'mymusic'. It's important to use proper naming techniques when naming any object on your Composition epsecially if you plan on referencing them within your scripts via the Script Editor.

3. If you imported a music loop object you'll probabely want to loop it continiuesly. One convieninet way of doing so is to create a label at the very first time interval at which your sound object's duration bar begins, and name it start. Now, go to the very last time interval at which the duration bar of the sound object ends and create the following keyframe script:


This script simply instruct the flash player that once your sound loop comes to an end, go back to label named Start loacted on "this" object and play the sound again. This process will continue infinately unless another script overwrites it.

3. Now, create three additional MCs. You can use the rectangle tool to create three small squares. These will be the buttons that will enables us to pan our sound object. After doing so, convert each of them to a MC as well. Lne them up in order and name the first one (starting from the left) "leftspeaker", the second, "bothspeakers", and the right, "rightspeaker".

4. Select the "leftspeaker" MC and pop open the Script Editor. Select the OnButtonRollover Event Handler and enter the following script:

pan = new Sound(_root.mymusic);

6. And finally, on your last MC, eneter the following script on its OnButtonRollover Event Handler:

pan = new Sound(_root.mymusic);


7. You're done. Hope it works for you.

Conclusion: When you preview your Composition you'll notice that the sound playing will be effected by your mouse's action when rolling over the three different MC that control the Pan. The first button which sets the pan to "-100" will force your comp to play its sound from the left speaker. It will continue to do so until you rollover over the remaining MCs. The second, sets the sound object's Pan to "0", which sets your Computer to play the sound evently between the left and right speaker. Finally the last button sets the pan to 100, which forces your comp to play from the right speaker. You may use any values between -100 and 100 when setting pan.

You can view the effect on my site at:


Copyright © 2002, All Rights Reserved RESOURCES  |  NEWS  |  SUBMIT  |  ABOUT  |  HOME is in no way affiliated with Adobe Systems Incorporated

Adobe, After Effects, AlterCast, Atmosphere, Design Team, GoLive, Illustrator, LiveMotion, Photoshop and SVG Viewer are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries.
Visit Adobe Systems Incorporated to learn more.