gwolff2005 Posted April 28, 2009 Share Posted April 28, 2009 Hi guys, I have a file (intro.php) with a php variable $Session(MM_username). How can I load this into a swf file. I know that this is not flash forum. But maybe someone knows it... Thanks so much!!! Quote Link to comment https://forums.phpfreaks.com/topic/155951-php-variable-into-flash/ Share on other sites More sharing options...
nadeemshafi9 Posted April 28, 2009 Share Posted April 28, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/155951-php-variable-into-flash/#findComment-820930 Share on other sites More sharing options...
gwolff2005 Posted April 28, 2009 Author Share Posted April 28, 2009 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!!! Quote Link to comment https://forums.phpfreaks.com/topic/155951-php-variable-into-flash/#findComment-820934 Share on other sites More sharing options...
RichardRotterdam Posted April 28, 2009 Share Posted April 28, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/155951-php-variable-into-flash/#findComment-820939 Share on other sites More sharing options...
gwolff2005 Posted April 28, 2009 Author Share Posted April 28, 2009 Thats a great help.. I will try that. Just one more question. I do not need to write anything in my php file for that, i sthat right. Because I read some comments referring to send data from php to flash and then retrieving it from flash... I am confused... Quote Link to comment https://forums.phpfreaks.com/topic/155951-php-variable-into-flash/#findComment-820943 Share on other sites More sharing options...
RichardRotterdam Posted April 28, 2009 Share Posted April 28, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/155951-php-variable-into-flash/#findComment-820944 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.