A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Sound timeline controls

  1. #1
    Junior Member
    Join Date
    Apr 2007
    Posts
    11

    Sound timeline controls

    I have dragged a short soundclip onto the stage (300kb) and i want to know how i can control it with a simple on/off button? anyone know how i can do that? also is adding a short sound loop like this to the timeline an acceptable method or is there a better way? cheers

  2. #2
    Senior Member layerburn's Avatar
    Join Date
    Jul 2006
    Location
    USA
    Posts
    542
    There are 2 different ways to handle sound, you can have it internal or external. Which way would depend on your project needs. If you have a lot of sound and need to watch file size, then external sound would be ideal. Otherwise if you only have a sound or two and they aren't that big then internal is fine. I've attached a example .fla to show you how to handle the sound internally. The sound is imported into the library, but not placed on the stage. Instead it is given a linkage identifier and referenced via code.

    You will need to import a song/sound into the example .fla i've included and give it a linkage name of song1 for the example to work, i couldn't upload it will a sound already in it sorry too big. Hope this helps.
    Last edited by layerburn; 08-28-2007 at 06:14 PM.
    This is your brain. This is your brain on script.

  3. #3
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    as well as the comments from layerburn, there is
    an excellent tutorial on using the sound object
    at the link in my sig.

    hth

  4. #4
    Junior Member
    Join Date
    Apr 2007
    Posts
    11
    cool, cheers for the help guys

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center