I finally got this uploaded to my server and discovered the audio is not working right. I have to click the button repeatedly to get the file to play through, and these are very short files. You can see what I mean at
It appears as if the sound files are getting clipped at the end. Is this just a natural result of the slowness of the streaming? Usually, once the sound starts there is no problem.
Can I fix this?
Last edited by jimventola; 08-22-2006 at 07:30 PM.
It sounds fine at diversioncentral. I guess that means my college server is at fault?
BTW--I noticed the pushbuttons only change color on a click the first time or so. After that, they remain inert when I click. Is this normal? (These are component pushbuttons.)
I think you've got a coding problem somewhere. The whole movie becomes unresponsive once I push the read along button. And I notice that FireFox is trying to retreive data continuously from the server.
How are you loading the audio, and are you tracking the load at all?
How are you loading the audio, and are you tracking the load at all?
Good hunch, Bret.
Here is the code I am using. As you can see, I (probably foolishly) commented out some code from Chris to see if it was needed. Probably is.
The reason for this surgery, er butchery, was that I wanted to avoid the checking for the max number of audio files. My first approach was just to set NAF to the number of audio files in KM; but I wanted the SWF to work for anyone even without KM, and I wasn't sure why you have to check to see if the current audio is the last audio file. Maybe it is needed, though. Or maybe I got rid of something else important?
I hope this can be fixed without requiring that the movie know the total number of audio files. Otherwise, I will have to have some way for the user to input that info for the code to use.
Does not work correctly for me. on the second page the voice cuts out and never finishes. This is only a wild wild guess but did you upload the mp3 as binary or ascii?
Any programming language is at its best before it is implemented and used.
I never hear the audio. It could just be your server is too slow to stream. You may just need to load the files differently.
If you load with streaming set to false you can then use getBytesLoaded and getBytesTotal to see how much is loaded then play it or even use onLoad Here is an example from the MM livedocs
Try making a short test using the code below and see how well your server is sending an MP3.
The following example dynamically creates two text fields that display the bytes that are loaded and the total number of bytes for a sound file that loads into the SWF file. A text field also displays a message when the file finishes loading. Add the following ActionScript to your FLA or AS file:
I never hear the audio. It could just be your server is too slow to stream. You may just need to load the files differently.
Thanks Bret. I will try to play with this. The odd thing is that I have plenty of audio streaming just fine from the same server. The difference is those were done with Wicked Streaming Program, which converts the audio to swf files and then plays them from a controller movie. I have 20 minute lectures that stream along. In fact, they even will stream to dial-up.
Wilbert suggested I change the onPress to onClick, since the first is for GUI buttons and the other is for component buttons, like these. I did that and re-upped, with still no joy. Naturally, it works perfectly locally.
I wonder if it could have to do with setting in Audacity or maybe the KM Export? But then, why does the original work fine from Diversion Central? That would suggest a server issue. Frustrating....
Last edited by jimventola; 08-23-2006 at 01:53 PM.
That originated in one of my Swish movies and on port over was left which refers to something he doesn't use....it's always the small stuff that gets by......sorry.
Which brings me back to how different Swish scripting is....not only do you have to learn it you have to deal with all the little oddities of it's syntax so stuff like that is what ends up biting you when you are tired and pissed you even have to edit lines of code because they refuse to get with it as far as normal actionscripting. Sorry again....
Try
_root.mySound = new Sound();
instead of
_root.mySound = new Sound(mySprite);
Does that make a difference ?
No difference. I am still getting strangeness. I went right to page two and the Reading played fine. Came back to page one, and it took a while to start and then cut out until I clicked repeatedly.
Even stranger... both files play fine when I open the url in windows media player but for some reason the webbrowser and flashplayer have a problem with opening the mp3 file from the mass.edu server.
That originated in one of my Swish movies and on port over was left which refers to something he doesn't use....it's always the small stuff that gets by......sorry.
I don't think this really bit us this time. Your code works fine locally and also from TMoore's site (see above).
It must be something with the server, even though the server streams other audio fine. I'm going to ask a friend to put it on his server to see if it works any better from there.
Jim, you are right that it's a server problem.
The fun file you PMed me also won't open.
Strange. Try this one; it is the current version.
Actually, when I just opened Reading1 on diversioncentral, it opened and played halfway in the QT player. I had to click play again, and then it worked. Very similar to what happens on the Massa server. BTW, the files are different since I wanted to re-upload as binary.
So now I am suspecting the mp3 files themselves. They were made with Audacity and Lame.
Last edited by jimventola; 08-23-2006 at 02:24 PM.
That zipped fun file opens fine but looking at the fun file I can't see any reason why it shouldn't work.
I've worked with Audacity before myself without any problem.
Most likely the mass.edu server is sending out headers with a wrong mime type or it has some sort of protection that allows certain extensions to be accessed only from a specific domain or referrer. You might be able to solve it with a .htaccess file if it's an apache server and you are able to find out what's causing the problem.