all groups > macromedia flash flash remoting > october 2003 >
You're in the

macromedia flash flash remoting

group:

php/flash/loadvars = confusion


php/flash/loadvars = confusion etg7
10/24/2003 8:08:57 PM
macromedia flash flash remoting:
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


Re: php/flash/loadvars = confusion DHJ
10/25/2003 6:52:16 PM
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

Re: php/flash/loadvars = confusion etg7
10/25/2003 7:12:56 PM
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

Re: php/flash/loadvars = confusion DHJ
10/26/2003 12:22:41 AM
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

AddThis Social Bookmark Button