Jump to content

php variable into flash


gwolff2005

Recommended Posts

maybe throgh url and then get in flash or post then get the post in flash, these are http headers so you will be bale to get them in flash? use ajax in javascript to send to the server or driectly throgh php using a request function or set a header type in a php file of xml and then output some xml or something and read it with flash , ur options are limitless.

Hi nadeemshafi..

Hey thanks for your fast answer. I looked the last two days through every forum and tried to keep up with programming skills but did not work out :-) It owuld be great if you could help me a little bit. What is now the best way to get the simple username into my swf movie and how can I do that? Thaks so much in advance!!!

I have a file (intro.php) with a php variable $Session(MM_username). How can I load this into a swf file.

If it's simply using just one var from php you want to use why simply not use flash vars?

http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16417

What you basicly do is echo out the php var so it can be used in your swf.

something like:(untested)

<param name="flashvars" value="var1=<?php echo $phpvar;?>" />
<embed src="flashvarsTutorial.swf" flashvars="var1=<?php echo $phpvar;?>" type="application/x-shockwave-flash" ></embed>

If i remember correct firefox and ie handles flashvars differently that's why you need to echo the var out twice. I am not very sure on this though since I haven't really used flash for over a year or so.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.