I have tried every thing I know. I have 4 buttons with sounds attached to them. Whe I preview the movie with Ctrl+Enter the buttons play the sounds fine. If I publish the movie in an .swf or .exe file the sounds won't play. There has got to be something very simple that I am overlooking.
Thanks in advance,
Russ
Radarguy, I'm having quite the same problem with sound. First, a button answer or two, for you...hopefully. Do your buttons have interactive sound associated with them (ie. rollover, clickdown, etc.) or does the button itself direct the user to your sound file? If interactive sound is your interest, create the buttons through the INSERT menu, put the sound in one or more of the four button frames that define your button.
The next scenario is my problem, and perhaps yours: I use buttons and actionscript to move around a portfolio of mine (think of a slideshow presentation). The script is on the main timeline. I defined a sound object, went into the library to link (aka LINKAGE) and named it, attached it to the button and it works great when checked. But online...no sound?? The button actionscrpt, which has been working fine for rollover, etc., is on the main timeline. I put the following sound code in the existing rollover statements:
on (rollOver) {
gotoAndStop("Scene 1", 5);
mySound.start(0, 1);
}
on (rollOut) {
gotoAndStop("Scene 1", 1);
mySound.stop();
}
Where should the sound object funtion statement be located, with regard to layers and frames? (Radarguy, you might need this:
mySound = new Sound();
mySound.attachSound("bornusa");
where mySound is any X or Y type variable assigned to your soundfile bornusa.)
When attaching a sound, and linkinng w/in the library, it requests to be "exported to the first frame". The image associated with my rollover has to be in frame 5...Is this a problem? I can only export to the first frame though. Any insight is welcomed! Thanks.
PE
“Any fool can make things bigger, more complex, and more violent. It takes a touch of genius-and a lot of courage-to move in the opposite direction.” – Einstein
To Oldnewbie:
Let me preface this by saying that I am using MX2004.
The first time I assembled the flash movie I could not even get the sound to work in the Ctrl+Enter preview until I noticed that the publish preference was set to Flash Player 6. As soon as I changed it to Flash Player 7 all worked with the Ctrl+Enter preview but still not the swf file. So I will try what you say just to give others the code but I doubt it working even as far as I have it.
To Professor_emp:
I have found that all the code that you can get in the first frame of the top layer(traditionally named actions or scripts) has the best chance of working since you are not putting the code in the Button Action.
I have also had success using the behavior technique to play a sound but for some, probably simple, reason this page is obstinate. I will ad the zipped file when I get home tonight.
Thanks all
Russ
Well, guys as luck would have it, while I was paring down the the buttons and graphics to just one to reduce the file size, I thought I would test the swf file and lo and behold it worked and even when imported into Dreamweaver MX. I hate when this happens. Like when I would work on TVs just by taking the back off they would work and then continue to work for years and I never new what caused it to break in the first place. Now I don't know what I did wrong in the code. Oh, well I guess I will just start adding and testing a little bit at a time. Thanks for all the assistance. It did not go to waste.
Russ