Hello all, I have a bit of a problem. I’m trying to get one movie to send a variable to another movie. I was hoping someone could show me how to check the string that’s being sent, and have the movie do stuff based on what string is being sent (if (string==“bla”){gotoAndPlay(“bla”);}. Thanks in advance.
I believe that what you’re trying to achieve is called XML.\rUnfotunately, I’m not at all an expert in this field, but you can try doing something like this:\r\rLink from the origin swf:\rgetURL("<a href=“http://www.yoursite.com/name.swf?variable=value");">www.yoursite.com/name.swf...e=value”);</a>\r\rI don’t know if that’ll work, because flash files work differently when not embeded into html pages. So your question interests me as well.
hmm… doesn’t seem like it should be that hard to do… XML shouldn’t be necessary… though I’m not posative off the top of my head. Would both swf’s be open on the same screen of the same computer? If not… like you want two different comps to talk to each other then yeah XML socket is the way to go… if it’s just one movie telling another what to do… that’s a little different.
Thanks for the reply. Here’s a more detailed description of th problem:\r\rI have 2 movies, each in a separate frame; ‘left’ and ‘main’. The ‘left’ frame is the navigation console, which is going to update the ‘main’ frame when a user hits a button. For a coulple of the pages I’ve embeded an .swf as the content of ‘main’. I need someway for the nav .swf to communicate with the ‘main’ .swf. I am using an fscommand to JS to pass a variable (myVar) from ‘left’ to ‘main’. Currently, myVar is passed to ‘main’, but I am unable to check the variable. I can only display it in a text box. So I know it’s being passed to the movie, but what I need to do is be able to read the variable, and based on the contents of said variable perform the proper action;if (myVar==“training”){gotoAndStop(“training”);}, or something to that effect.
I’m shooting in the dark here, but did you manage to achieve it using this?:\r\rButton Action on nav.swf:\r\ron(Release){\rgetURL(“menu.swf?myVariable=training”);\r}\r\rAccording to what upu said, it should work…
I think that will work… ?myVariable=something at the end of an address should send that variable along to the swf that you’re loading.