I'm mostly having issues with SWF files that refuse to talk to each other.
It's almost as if SWF files were inherently designed not to talk to each
other. Or anything else. It's insane.
I can get one file to send data using the GET command. But I can't get the
other to retrieve it.
I can get both files to access the same XML file, but the file that needs to
send the message refuses to save it permanently.
And nether file seems to want to talk to txt, or cmf, or html.
Now maybe I misunderstood the security protocols, but the two files are in the
same domain, and onto of that I have set acceptDomain to "*" to make sure the
domain is allowed.
The files I'm using are specifically in the same folder.
Basically I have used java script to call a new window, without all that extra
browser stuff. If there is a way to do this in flash, I couldn't find it.
Now I have two files in two separate html docs. I just need to pass on a url
that leads to a common file they'll both be sharing. And another variable that
needs to be set.
If it's not a security issue, I can't think of why these files can't send and
retrieve information to a common file. So I'm at a roadblock.
communication between two independent swf files
Tekkaman Cypher - 17 Jan 2007 20:47 GMT
Hey Duck,
Are both SWF's existing in the samewindow or same browser at the same time almost like two framsets?
Duckyofdoom.com - 18 Jan 2007 18:04 GMT
Hey thanks for responding, no they are opened in two difrent windows.
One window is opening the other.
It's a full screen button, when you press it, another window opens. All I need
to transfure is the flv to play, and some basic information that tells the site
wich watermark to display. I got it to work once on my website, I think really
I just need to put some code in to check to see if the file is loaded.
However if you have some good ideas, let me know.
cside - 25 Jan 2007 20:59 GMT
Flash sits on web pages and is controlled by the browser. All the rules Flash
follows are true for everything in the browser.
Javascript can communicate with Flash for around 90% (rough guesstimate - you
need real data to know) of common visitors (some Mac and Mozilla browsers don't
work). So you can only use javascript communication for enhancements, not
necessities (your site has to work without it).
First question is why two seperate swfs? If you really have to have two, can
you reload the other Flash (refresh the html page) so it gets the new data?
Other than that, the remote Flash could poll (reload over and over) the text
data until it gets an answer. Just keep the text file small and it's no
problem at all. Make sure to add a random variable to end of url so you dont
pull data from browser cache:
textData.txt?noCacheVar=9383837
Duckyofdoom.com - 25 Jan 2007 22:18 GMT
Really the only reason was becuse I needed the file to open a window without
chrome. Wich is marketly harder than getting the files to comuincate. Once I
got the first file to throw the varibles, and the second to catch them. It was
a matter of just putting a statemnt that checked if the data was there or not.
I never figured out how to open a window without chrome. So it didn't matter.
However you seemed to indicate that one could call another flash file to the
same html. That might be usefull.