0
Passing data from php to flash
New Here
,
/t5/animate-discussions/passing-data-from-php-to-flash/td-p/384015
Mar 06, 2008
Mar 06, 2008
Copy link to clipboard
Copied
I am creating a quiz program. For this i get the loginid in
my php page and i hav linked to a page where i hav embeded my
quiz.swf file... after the quiz i display the marks in my movie
itself and i sucessfully passed the marks to my php. Now the prob
is i hav to get the corresponding loginid also with my marks so tat
i can store them in a database. is there any way to pass the
corresponding loginid to the quiz.swf??
Can anyone plase help me ? I am using flash 8.
Thanks in advance
Can anyone plase help me ? I am using flash 8.
Thanks in advance
TOPICS
ActionScript
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
New Here
,
/t5/animate-discussions/passing-data-from-php-to-flash/m-p/384016#M255540
Mar 07, 2008
Mar 07, 2008
Copy link to clipboard
Copied
Do a google search on LoadVars() tutorial...
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
ronytom
AUTHOR
New Here
,
/t5/animate-discussions/passing-data-from-php-to-flash/m-p/384017#M255541
Mar 07, 2008
Mar 07, 2008
Copy link to clipboard
Copied
I am tring to just pass the variables from php and display
them in flash
My php code:
<?php
$firstname="Rony";
print "firstname=$firstname";
?>
In flash i hav a dynamic text field with the variable name as "firstname"
My actionscript:
loadVariablesNum("nameofphp.php", 0);
firstname.txt = firstname;
But i get nothing when i run my swf.Both the files are in the same location.Can anyone please help?
Thanks in advance
My php code:
<?php
$firstname="Rony";
print "firstname=$firstname";
?>
In flash i hav a dynamic text field with the variable name as "firstname"
My actionscript:
loadVariablesNum("nameofphp.php", 0);
firstname.txt = firstname;
But i get nothing when i run my swf.Both the files are in the same location.Can anyone please help?
Thanks in advance
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
New Here
,
/t5/animate-discussions/passing-data-from-php-to-flash/m-p/384018#M255542
Mar 07, 2008
Mar 07, 2008
Copy link to clipboard
Copied
Are you loading this through the Flash IDE or testing it
live? This tutorial seems to be doing exactly what you want to do:
How to
use LoadVars Tutorial
It could also be that you have to do something the fact that you're not "swonking"- you have to wait for Flash to finish loading the data in, otherwise you essentially end up calling a method on said data before it's loaded as Flash doesn't perform a method/function and then wait it will carry on- which I expect is happening to you. Look at the tutorial above, it shows you how to combat this problem by creating a delegate function which will wait for your data and then try to use.
It could also be that you have to do something the fact that you're not "swonking"- you have to wait for Flash to finish loading the data in, otherwise you essentially end up calling a method on said data before it's loaded as Flash doesn't perform a method/function and then wait it will carry on- which I expect is happening to you. Look at the tutorial above, it shows you how to combat this problem by creating a delegate function which will wait for your data and then try to use.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/animate-discussions/passing-data-from-php-to-flash/m-p/384019#M255543
Mar 07, 2008
Mar 07, 2008
Copy link to clipboard
Copied
Also, look at embedding your movie using SWFObject, it allows
you to easily
pass variables from PHP into your movie.
http://blog.deconcept.com/swfobject/
--
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/
pass variables from PHP into your movie.
http://blog.deconcept.com/swfobject/
--
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
ronytom
AUTHOR
New Here
,
LATEST
/t5/animate-discussions/passing-data-from-php-to-flash/m-p/384020#M255544
Mar 07, 2008
Mar 07, 2008
Copy link to clipboard
Copied
Thank u so much Mr.lilalfyalien.... The tutorial helped me
Now wen i run from flash, i get a seperate window called output and in tat i get "Variables Loaded"
Now wat i want is i should display the values in the variable in my movie itself. For that i think i should use dynamic text.
Can u please explain that step and also the corresponding actionscript???
Thanks in advance
Now wen i run from flash, i get a seperate window called output and in tat i get "Variables Loaded"
Now wat i want is i should display the values in the variable in my movie itself. For that i think i should use dynamic text.
Can u please explain that step and also the corresponding actionscript???
Thanks in advance
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

