PDA

View Full Version : Changing icons (frame) in multiple swfs with localconnection


cryptoboy
01-26-2005, 08:25 AM
Hi,

I have a flash audioplayer that reads aloud the text on the pages ...there are often 2 or 3 flash films (swfs) on each page ...

Whenever the user clicks a player I want to make sure it stops all other sounds running before starting its own ... that can be accomplished with a simple stopAllSounds(); ... BUT it would also be nice to change the icon from playing (frame 2) to stopped (frame 1) in all the players that are put to silence ... How to do ?

This is a less than futile and feeble attempt ... do I need LocalConnection and how do you incorporate it in the as for the player ? :eek:

function PlayTheSound(){
if (_global.Playing == false){
var lc = new LocalConnection();
lc.connect("button_network");
lc.send("button_network","StopTheSound");
_global.Snd.start((_global.SndPos/1000), false);
_global.Playing = true;
gotoAndStop("frmPlaying");
}
}


function StopTheSound(){
_global.SndPos = 0;
_global.Snd.stop();
_global.Playing = false;
gotoAndStop("frmPaused");

cryptoboy
01-27-2005, 07:36 AM
noone ? :-(