Sound Objects - Help

  • VictorEremita
  • Newbie
  • Newbie
  • VictorEremita
  • Posts: 10

Post 3+ Months Ago

Hi. I am trying to create Sound Objects using this tutorial: http://kennybellew.com/tutorial/ but there's something I really don't understand.

I am trying the attachSound method and I have already created a name inserted in the linkage properties of the sound file that have been imported into the Flash library. Ok, and the tutorial tells me that I should "Decide where to define the sound objects." - and I'm lost. What do they mean about that?

They mention this code that I have to use to define my sound:
Code: [ Select ]
_root.firstSound=new Sound();
_root.firstSound.attachSound("firstSound01");
  1. _root.firstSound=new Sound();
  2. _root.firstSound.attachSound("firstSound01");

("firstSound" will refer to the name chosen for the instance of the sound object. Similarly, "firstSound01" will refer to the identifying name inserted in the linkage properties of the sound file that will be imported into the Flash library.)

... But where do I insert that code? Well, I just tried to insert the code in my first frame, replacing firtSound01 with the linkage-name that I chose for the sound file. Then I also put this in the first frame because I wanted the sound to play:
Code: [ Select ]
_root.firstSound.start(0,999);


Well, that's how I understood the tutorial but I have obviously missed something. What am I doing wrong?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

can you post your actual code (all the sound stuff you put on the frame)? Also when you click the little play button by the sound in the library does it play?
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Well, how do you want the sound to play? Do you want it to play when a button is pressed? When it's moused over? Or just automatically as soon as the frame is entered?
  • VictorEremita
  • Newbie
  • Newbie
  • VictorEremita
  • Posts: 10

Post 3+ Months Ago

I just want it to play at a certain frame, then stop at another frame and play again layer at yet another frame.

I have this in the first frame (tvnoise01 is the linkage name of a sound file):
Code: [ Select ]
 
root.firstSound=new Sound();
_root.firstSound.attachSound("tvnoise01");
 
_root.firstSound.start(0,999);
  1.  
  2. root.firstSound=new Sound();
  3. _root.firstSound.attachSound("tvnoise01");
  4.  
  5. _root.firstSound.start(0,999);


And this in a frame where I want it to stop:

Code: [ Select ]
_root.firstSound.stop("tvnoise01")


This acutally works fine in the flash program, and when pressing enter, but when I upload to the internet, there's no change.

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 8 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.