hello all...
i have a php page with multiple, small swfs embedded...one of them i use for a menu...the other i use to show text information... my question is this...
i'm using a loadvars object to send info from the menu-swf to a php page (that is not loaded) that does nothing but echo the data i just sent it...
if i do a sendandload the data comes right back to the movie i sent it from...cool...no problem, but now i want to get that same info into the other (textbox )swf...
so what i did is change the sendandload to just send...this forces a new page to load...and in the textbox swf i do a loadvars.load...and instead of sending the data to a blank page i send it to a page that loads when i do the send...still with me?
can i send data to another movie this way? load command returns true, but i cant retrieve the info posted to the server...
so far it either shows up in the url like this www.somesite.com/somepage.php?someData=blahblahblah
or
if i put some php code in the page that loads i can see the data i just posted...
any help would be great
thanks
DHJ - 25 Oct 2003 19:52 GMT
Let's call the (textbox)swf "tb.swf" and say it has a text box on the root timeline called tb_test. The main swf (i.e. loaded into level 0) is called "main.swf"...
1. If you have loaded tb.swf into level n in the Flash Player (using loadMovieNum):
//set the text property of tb_test
_leveln.tb_test.text = myVar;//replace n with the layer number e.g. _level1
2. if you have loaded tb.swf into a target movie clip, mc_target on the main timeline (i.e. root) of main.swf (using load movie):
//set the text property of tb_test
_root.mc_target.tb_test.text = myVar;
Note that this code is contained on the main timeline of main.swf
Hope this helps
Duncan
etg7 - 25 Oct 2003 20:12 GMT
thanks duncan,
i understand what you mean...and it does help in that it opens up another way to accomplish this....i posted this same message on another forum and got a completely different answer...one using local connection object between 2 players on the same client machine....all of these suggestions are very helpful...thanks again
b
DHJ - 26 Oct 2003 01:22 GMT
Glad it helped.
You may want to have a look at this tutorial, integrates Flash MX with PHP
http://www.macromedia.com/devnet/mx/flash/articles/flashmx_php.html
Unlocks the power of Flash by avoiding screen refreshes etc...
All the best with your app!
Duncan