PDA

View Full Version : loadsound problems not starting at requested position


leejsmith
10-01-2007, 11:03 PM
i am working on a mp3 based player but i need to continue playing after the page is refreshed.
i store the current play position using shared objects and can retrieve the value but nothing i do will make it jump to that position.
if i then click on the time bar it will jump and play to any position i want.
can anyone offer any reasons for this as it's driving me mad.
also why does firefox not store the mp3 like IE does after it's completed the download.

you can see what i am working on here

http://www.128kbs.net

thanks

Lee

hey_duude
10-02-2007, 12:14 PM
are you using as2 or as3?

I may well be wrong but i recently had to do something involving sound where i need to move through the sound file and don't believe that sounds loaded dynamically can actually be navigated.

The property which you can retrieve which tells you which part of the sound is currently being played (time) i believe is read only. You can navigate through sounds which are placed on the timeline but i couldn't figure how to navigate dynamically loaded sounds.

AS3 may well be different, i haven't got round to checking yet.

mikenaman
10-02-2007, 12:29 PM
Hi

I can not remember whether I ever got this working in AS2, it does however work in AS3.

AS2
view liveDocs (http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00002144.html)

You code should look like this...
my_sound.start(500);

The liveDocs example loads in an mp3, but dosn't specify a start time so there's no working example. Are you setting the isStreaming property of loadSound methord to false? Setting it to false sets it as an event sound rather than a sound stream (you can not navigate a stream).

Let us know if it works!

leejsmith
10-03-2007, 01:20 AM
i am using as3 and the mysound.start(seconds,true) command but it does not work at the start of the code.

the flash starts and then checks for any stored shared objects.
if they exist it reads the id of the current mp3 and the last recorded playing position.
then using a loadvars command to call a php script it loads the actual mp3 name to be played from the mysql database.
i then start the sound using the shared objects stored value but it starts from the beginning very time.

while the mp3 is playing i also have a time bar that you can click on to jump through the mp3 and this works every time it just wont jump at the start of the code.

mikenaman
10-11-2007, 11:19 AM
MMM...

Sounds like it could be the server setup (streaming not set up perhaps?), does it work locally?

leejsmith
01-18-2008, 10:48 AM
sorry i have not responded to this problem for a while.
i think i have found out why the mp3 is not continuing when i refresh the page it's the shared objects not working on my system.

i used this page as a known working example

http://www.permadi.com/tutorial/flashSharedObject/

and published it on my system but it fails to work on all pc's i try

http://www.128kbs.net/sharedObjectSample.html

is there some security option or setting i need to check before i publish it i made sure it's flash 8 and action script 2. when i debug it just shows the calue as unknown.