A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Sound object: mySound.start(secondOffset);

  1. #1
    Senior Member
    Join Date
    Jun 2001
    Location
    Virginia, USA
    Posts
    437
    I tried that but it did not work? This is my code

    Code:
     
    mySound = new Sound(mcSound); 
    mySound.start(300);
    Anyone knows why?

  2. #2
    Senior Member
    Join Date
    May 2001
    Location
    VA
    Posts
    145
    Hi carbon, Ok, when I do variable sounds in a flash timeline, I use the following code:

    Code:
    s = new Sound(); 
    //sets up variable "s" to hold a new sound
    s.attachSound("Soundtrack");
    //attaches the sound called "Soundtrack" to the variable "s"
    s.start(0,100);
    //starts "Soundtrack", which will start with a 0 second offset, for 100 loops.  As with the example above, even if you do not use one of these variables, you must enter the value 0.
    That should do it, your problem was that you left out the 's.attachSound("Soundtrack");' line. So basically, you had a variable set up to hold the sound, but you never actually put the sound in the variable. Well, I hope this has been helpful, post here again for any more advice.

    Trmbne2000

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