Click to See Complete Forum and Search --> : Aud-Comments
jimventola
08-22-2006, 01:38 PM
Here is a zip file with my Audio Commenting system for teachers. The audio is just for demonstration. The instructions are aimed at total newbies.
Comments and suggestions most welcome. And thanks again to all for the help.
jimventola
08-22-2006, 07:27 PM
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
faculty.massasoit.mass.edu/jventola/ac/Aud-Comments.html
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?
tmoore935
08-22-2006, 07:45 PM
http://www.diversioncentral.com/jim/Aud-Comments.html
tell me how it sounds here. seems ok to me.
jimventola
08-22-2006, 08:06 PM
http://www.diversioncentral.com/jim/Aud-Comments.html
tell me how it sounds here. seems ok to me.
Thanks for this experiment.
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.)
tmoore935
08-22-2006, 08:13 PM
To be honest I have never used the components since i still live in the flash 5/6 days. But I do not recal ever seeing any color change.
blanius
08-22-2006, 09:02 PM
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?
jimventola
08-22-2006, 11:23 PM
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.
p1.onPress=function(){
_root.mySound.stop();
//if(contentpane1.getPage()<naf){
_root.mySound = new Sound(mySprite);
_root.mySound.loadSound("Reading"+contentpane1.getPage()+".mp3", true);
_root.mySound.setVolume(100);
_root.mySound.start();
//}else{
//if(contentpane1.getPage()=naf){
//_root.mySound = new Sound(mySprite);
// _root.mySound.loadSound("Reading"+contentpane1.getPage()+".mp3", true);
// _root.mySound.setVolume(100);
// _root.mySound.start();
//
}
//}
//}
//
p2.onPress=function(){
_root.mySound.stop();
//if(contentpane1.getPage()<naf){
_root.mySound = new Sound(mySprite);
_root.mySound.loadSound("Comment"+contentpane1.getPage()+".mp3", true);
_root.mySound.setVolume(100);
_root.mySound.start();
//}else{
//if(contentpane1.getPage()=naf){
//_root.mySound = new Sound(mySprite);
// _root.mySound.loadSound("Comment"+contentpane1.getPage()+".mp3", true);
// _root.mySound.setVolume(100);
// _root.mySound.start();
}
//}
//}
jimventola
08-22-2006, 11:30 PM
I uploaded a newer version.
faculty.massasoit.mass.edu/jventola/ac/Aud-Comments.html
It seems to work better now.
Wilbert sent me a bugfix. I am not sure if that's all it was. Or why it would work better from a different server.
Please check it out and let me know if it works ok. Thanks again.
tmoore935
08-22-2006, 11:39 PM
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?
jimventola
08-23-2006, 02:25 AM
This is only a wild wild guess but did you upload the mp3 as binary or ascii?
Hmmnnn..... rubbing chin.....
Actually, I used NetDrive and just dragged and dropped!
I've uploaded some slightly longer ones, this time as binary using FTP.
But audio still stutters.
blanius
08-23-2006, 08:04 AM
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:
this.createTextField("message_txt", this.getNextHighestDepth(), 10,10,300,22)
this.createTextField("status_txt", this.getNextHighestDepth(), 10, 50, 300, 40);
status_txt.autoSize = true;
status_txt.multiline = true;
status_txt.border = false;
var my_sound = new Sound();
my_sound.onLoad = function(success:Boolean) {
if (success) {
this.start();
message_txt.text = "Finished loading";
}
};
my_sound.onSoundComplete = function() {
message_txt.text = "Clearing interval";
clearInterval(my_interval);
};
my_sound.loadSound("song2.mp3", true);
var my_interval;
my_interval = setInterval(checkProgress, 100, my_sound);
function checkProgress(the_sound) {
var pct = Math.round(the_sound.getBytesLoaded()/the_sound.getBytesTotal() 100);
var pos = Math.round(the_sound.position/the_sound.duration 100);
status_txt.text = the_sound.getBytesLoaded()+" of "+the_sound.getBytesTotal()+" bytes ("+pct+"%)"+newline;
status_txt.text += the_sound.position+" of "+the_sound.duration+" milliseconds ("+pos+"%)"+newline;
}
jimventola
08-23-2006, 01:40 PM
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....
w.brants
08-23-2006, 01:54 PM
The button itself works fine now.
Try
_root.mySound = new Sound();
instead of
_root.mySound = new Sound(mySprite);
Does that make a difference ?
Chris_Seahorn
08-23-2006, 01:57 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.
Chris_Seahorn
08-23-2006, 02:04 PM
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. :thumbsup: Sorry again....
jimventola
08-23-2006, 02:08 PM
The button itself works fine now.
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.
w.brants
08-23-2006, 02:09 PM
Jim, you are right that it's a server problem.
The fun file you PMed me also won't open.
If I try to access the mp3 directly this one plays fine
http://www.diversioncentral.com/jim/Reading1.mp3
and this one not
http://faculty.massasoit.mass.edu/jventola/ac/Reading1.mp3
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.
jimventola
08-23-2006, 02:11 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.
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.
jimventola
08-23-2006, 02:18 PM
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.
w.brants
08-23-2006, 02:34 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.
tmoore935
08-23-2006, 07:36 PM
I can repost anything on my site for anyone if this problem occurs again. I have used adacity with no problems but rely on a beta version cdex. In fact I have even silently posted music so that i could listen to it overseas. As for a .EDU server putting restrictions in or using wrong mime types would not be nothing new. I can say this from personal experience. Would hiding a mp3 as a swf work? :confused:
ant_Z
08-23-2006, 08:48 PM
Here is a zip file with my Audio Commenting system for teachers. The audio is just for demonstration. The instructions are aimed at total newbies.
Comments and suggestions most welcome. And thanks again to all for the help.
sorry for not helping, but today i havent even got time to read all the posts. Im interested in this script - you can contact with me if you would like to have free server allowing mp3s and I can help you with server-side.
jimventola
08-23-2006, 09:26 PM
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.
Apparently not. The webmaster was kind enough to take a stab at this. I think he got confused because I replaced the orignal mp3 files (as appear on Tim's site now) with slightly longer ones. So he noticed that the mp3s of Reading1 you linked
Have different audio files (MP3's). When using Flash you use frames and key frames. If you create a flash files using a 5 second audio clip and then replace "only" the audio clip with a ten second clip, it will only play the first five seconds and then cut off the remainder. Did you update the swf when the audio files changed?
The first URL clips are shorter then your faculty domain clips. That is what I believe may be causing your issues. Replace the MP3 files with the ones on the first URL and try again. We do not restrict the headers nor filter them, as well as mime types.
To be safe, I deleted everything and re-upped, with still the same result. But at least we know they are not intentionally blocking anything.
jimventola
08-23-2006, 09:39 PM
Would hiding a mp3 as a swf work? :confused:
Well, they say they are not blocking. Sure enough, though. I can play an swf audio with no problem but not an mp3. At least, the mp3 here won't play at all for me.
http://faculty.massasoit.mass.edu/jventola/BoogieWoogie.mp3
http://faculty.massasoit.mass.edu/jventola/wsp11s.swf
(BTW, is Flashkit shortening my urls? What I typed for the first link was
faculty.massasoit.mass.edu/jventola/BoogieWoogie.mp3. I noticed the ellipses before when I typed in links.)
I do not get to hear the boogie woogie, but I do get to hear the fiddle club trying to learn a hot rhythm on the swf.
I think this is just coincidence, though. Unless, as has happens even in small groups, one hand doesn't know what the other is doing and someone HAS put a block on.....
tmoore935
08-23-2006, 10:05 PM
currently I am redoing my pc... reformating...
blanius
08-24-2006, 08:02 AM
FK will shorten a long URL but it only affects the dispaly the link still works.
jimventola
08-24-2006, 01:23 PM
you can contact with me if you would like to have free server allowing mp3s and I can help you with server-side.
Thanks. I sent you a private mail message.
ant_Z
08-24-2006, 05:17 PM
Thanks. I sent you a private mail message.
no you didnt :]
jimventola
08-25-2006, 03:31 PM
It was the college server. They found the problem and it works fine now. Nothing to do with KoolMoves, of course. Thanks for all the help.
Now, if anyone has any suggestions for improvements...
http://faculty.massasoit.mass.edu/jventola/ac/Aud-Comments.html
tmoore935
08-25-2006, 04:37 PM
It was the college server. They found the problem and it works fine now. Nothing to do with KoolMoves, of course. Thanks for all the help.
Now, if anyone has any suggestions for improvements...
http://faculty.massasoit.mass.edu/jventola/ac/Aud-Comments.html
Got my PC done now. I would not mind looking at the finished actual page. In college I remember a physics demo on a c++ program, but it had no sound.
flashkit.com
Copyright Internet.com Inc., All Rights Reserved.