Using 1 shared object to update seperate swfs dynamicaly

What I am trying to do is make a music player for a website that runs 'constantly' not pausing, stopping or getting reset when a user changes page in the site.

To achive this I have created two flash movies a control swf with play stop etc. and a player swf which receives instructions from the control and loads in the sound file and changes volume.

To avoid inturruption in the playing music when the user changes page I have put the control swf in a frameset with the rest of the page content and the player swf in a seperate frame.

The problem im having is that the two are not comunicating with eachother 'dynamically' i.e as soon as an instruction is sent. They only update when the page is refreshed. To test this i have used a slider in one movie and a dynamic txtbox in the other movie both set the same shared object. When the slider is moved in theory it should also change the txtbox in the other movie

I think the problem may be with the use of the flush fuction?

Can anyone shed any light on how to use this?
Thanks
koobenAsked:
Who is Participating?
 
negatyveConnect With a Mentor Commented:
I think that the sharedObject functionalities you are trying to use are those that come with the FlashComm server features. What you are looking for, maybe, is this: http://www.macromedia.com/support/flash/action_scripts/local_connection_objects/
0
 
krishnaprathabConnect With a Mentor Commented:
Hi Kooben,

 An easier way to do this is to use a setInterval function which will call a function at specified intervals to see if the shared object has changed and then do the loading and stuffs.

Example:

function checkSO()
{
    // Write the code to fetch the shared object details here
}

myInt = setInterval(checkSO, 300);

Here, 300 is the milliseconds count, the funciton will be called every 300 millseconds. You can increase or decrease this time.

Hope this helps !

Thanks,
KP
0
 
koobenAuthor Commented:
Thanx for the fast response, but I think I think I have solved the problem myself.

Not sure how the points are gonna work out now but I'd like to give both of you some at least.

Thanx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.