I don't know if this is an issue with Flex, or how I've set my webserver up but basically I've made an MP3 player component in flex based on the Sound class. It works fine apart from the position slider I have made for the player (using the HSlider class in Flex 4) cannot navigate towards the end portion of the track - the audio freezes up and the player stops playing.
I have made sure that the position slider is only activated when the bytes loaded is equal to the total bytes, so that shouldn't be the problem - it is all buffered before I try to navigate to towards the end of the track.
So why does it freeze up when I set the position slider towards the end of the track?
Only thing I can think is that you have to call the stop() function to stop the Sound playing and then seek the new position. Does stopping the sound, remove the data that you have buffered? Is this a caching problem with webservers that I am not understanding, or can I code something in actionscript to overcome it?
Any thoughts would be much appreciated...
Another thought I had is whether my maths in providing the new sound position to play from is trying to seek a position which is too precise, ie too many decimal places and that may confuse the play function so that it doesn't bother... By the way, I am having to set a new property called snap interval on the flex 4 slider for it to navigate to all values, not just 0 and 1. Could this also be part of the problem - why does it not, by default, glide through all values from 0 to 1 like it used to?
Thanks for any help anyone can provide...
Forgot to mention, that the reason I think it might not be a Flex problem is because the player works fine when tested on local server. It is only when uploaded to web server that the tracking issues I mentioned occur.. But perhaps there are settings I can sort in Flex to overcome this, or someone knows what this may be due to?
anyone else had similar problems? is it an issue with how to manage the streaming from flex or am i way off the mark? thanks.