Forum Moderators: open
The problem is this:
On the knob that changes channels, there are invisible buttons (+ and -), and each of these buttons has an event sound on it's down state (sounds like clunk of knob turning). This event sound plays normaly when the buttons are pressed during the first approx. 15 seconds. Then, mysteriously, the sounds refuses to play, when either button is pressed. Other sounds in the movie continut to work, but this one sound doesn't.
It is very odd and I don't even know where to start to fix it. I did do one thing for troubleshooting. I put the movie clip with the buttons by itself in a new movie, and it worked fine. Then when I put it back in the original movie it had the same problem again.
Has anyone experienced a problem like this before. Any ideas would be greatly appreciated!
[edited by: BlobFisk at 4:15 pm (utc) on June 3, 2005]
[edit reason] No URLs please! See TOS [webmasterworld.com] [/edit]
I always place all the code now within the main timelne where possible, makes problems easier to diagnose.
I presume the parent movie is running a timeline as you stated the first 15 seconds, is there anything on the timeline which is interfering, or are the buttons being overwriten or changed at some further keyframe?
You may need to remove/disable each item in turn to debug the problem
Since my link was removed to the page I wanted to add a bit more description. I tested it some more and realized that the sound does seem to stop at about 15 seconds after the movie loads. If I push the button over and over again right from the start, it will make the sound every press, and then 15 seconds later suddenly I press and no sound. Also, If I just let it sit there, not pressing the buttons, then after 15 seconds press it once, no sound.
*** To see the swf I'm having trouble with here please go to my profile and click on my homepage. Once there find Helios Project in the Design section. It is that page that I'm referring to.
The main timeline, and every other timeline in the movie for that matter, end before 15 seconds, so I can't see how anything else in the movie could be changing after 15 seconds and affecting the button's sound in this way.
I will try the idea with listeners and see if I can get that working. Perhaps removing the sound from the button entirely and putting it on the main timeline will somehow solve the problem. I'm just worried about one thing with this: Will this result in the sound being played just as instantly as it does when placed on the hit state of the button? Timing here is very important, and if there is even a fraction of a second delay it will not sound right.
If anyone else has more ideas please keep shooting. This is a weird issue and I need all the minds I can get to help please.
I'm not an Actionscript pro and I couldn't figure out how to do the listener thing, but I found a way to trigger playing of the sound from the main timeline that has the same effect. Needless to say it didn't solve the problem. It did trigger the sound each time, but like before stopped working after about 15 second. Here's the code I used on the main timeline:
stop();
this.onEnterFrame = function(){
if (_root.knobturn) {
knobSound = new Sound(this);
knobSound.attachSound("knobturn");
knobSound.start();
_root.knobturn = false;
}
else {
}
}
and then this on the button:
on (press) {
_root.knobturn = true;
This created a slight delay in the playing of the sound (miliseconds) but it was noticeable. I could live with the delay if this had solved the problem, but it doesn't.
Any ideas here?! No matter where or how I trigger this sound, it refuses to play after the movie has been loaded for 15 seconds!