sound not working

  • newnewNewbie
  • Born
  • Born
  • newnewNewbie
  • Posts: 4

Post 3+ Months Ago

I am a beginner in flash

I am working on AS2

I have given a button next to a text. on clicking on the button, it plays the sound.

while importing swf from fla the sound is attached

when i integrate and call my swf it doesnt work.

the action script for the button is

Code: [ Select ]
on(release)
{
stopAllSounds();
s=new Sound();
s.attachSound("Alarm");
s.start();
}
  1. on(release)
  2. {
  3. stopAllSounds();
  4. s=new Sound();
  5. s.attachSound("Alarm");
  6. s.start();
  7. }


Where "Alarm" is sound imported in the library.

also after integration the file is behaving abnormally.

Symbols which are graphics are somehow converted into buttonsa and get linked to other files in the folder.

Please help.
I have a deliverable soon...
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23460
  • Loc: Woodbridge VA

Post 3+ Months Ago

Can we assume you've right clicked your library sound, exported for action script and put Alarm as the linkage name? (i.e. make sure it's the linkage name and not just the Identifier name)

If so try this:

Code: [ Select ]
on(release)
{
stopAllSounds();
var s:Sound = new Sound();  //data type the variable
s.attachSound("Alarm");
s.start();
}
  1. on(release)
  2. {
  3. stopAllSounds();
  4. var s:Sound = new Sound();  //data type the variable
  5. s.attachSound("Alarm");
  6. s.start();
  7. }


If that doesn't work, try replacing
var s:Sound = new Sound();
with
var s:Sound = new Sound(this);
//where this refers to the name of a movie clip

http://livedocs.adobe.com/flash/mx2004/ ... 01672.html
  • newnewNewbie
  • Born
  • Born
  • newnewNewbie
  • Posts: 4

Post 3+ Months Ago

hey.. thanks..
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23460
  • Loc: Woodbridge VA

Post 3+ Months Ago

You're welcome. I take that to mean it worked for you?
  • newnewNewbie
  • Born
  • Born
  • newnewNewbie
  • Posts: 4

Post 3+ Months Ago

yes!! it worked.. :D

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 3 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
 
cron
 

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