Solved

Using 1 shared object to update seperate swfs dynamicaly

Posted on 2004-10-10
5
197 Views
Last Modified: 2012-05-05
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
0
Comment
Question by:kooben
5 Comments
 
LVL 27

Accepted Solution

by:
negatyve earned 250 total points
Comment Utility
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
 
LVL 9

Assisted Solution

by:krishnaprathab
krishnaprathab earned 250 total points
Comment Utility
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
 

Author Comment

by:kooben
Comment Utility
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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now