Expand my Community achievements bar.

sharing data between swf files

Avatar

Level 2

Hello,

     I have a login.swf file which authenticates the user. Once login is successful I want redirect to loggedin.swf file and pass some user information to the loggedin.swf?. How do i do it? I dont want to use shared objects as users may prevent saving  on to local machine. I dont want to send it in URL either. I want something like hidden variables in html. Is it possible.

Thanks,

Bharani

6 Replies

Avatar

Former Community Member

I think you should be able to use the LocalConnection class to communicate between two SWF.

These links should help:

http://livedocs.adobe.com/flex/3/html/help.html?content=controls_15.html

http://learn.adobe.com/wiki/display/Flex/Local+Connections

If this post answers your question or helps, please mark it as such.

Avatar

Level 2

LocalConnection will work only when two swf files are open. But login.swf will be closed once it redirects to loggedin.swf. I m not sure LocalConnection can be used.

Avatar

Level 1

Can we share data between one swf to any number of swf's ?

The number of swf can vary as per XML data.

Avatar

Level 2

You can share data between swf files using LocalConnection as long as both the swf files are open. If one swf file redirects to the other one then you cant. I did a work around to solve this problem.I m using php sessions instead. One swf file sets the session variable and other swf file retrieves the variables from the session. These are done using HttpService.

 

Thanks,

BHarani

Avatar

Former Community Member

You can use a ViewStack or states so the SWFs are open, then you can use LocalConnection.

If this post answers your question or helps, please mark it as such.

Avatar

Level 1

Hi

I have mutiple swf files in single page each having its sound attached to it.

Now I want one sound to play at a time while all rest swf's sound to be mute.

When user clicks second swf then first swf sound to be mute and second's swf sound to play and all rest swf to mute.

Similarly when he clicks third then third's sound to play while rest all swf to be mute.

I have already implemented swf with sound attached.

But they all are playing at a time.


How this control can be implemented ?? Number of swf files can vary.

Any help??