Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-26-2005, 12:18 AM   PM User | #1
Crazydog
Regular Coder

 
Join Date: May 2005
Posts: 224
Thanks: 1
Thanked 0 Times in 0 Posts
Crazydog is an unknown quantity at this point
Some help...server side content in flash...

So I have this PHP page and this flash movie. I want to make it so the flash pulls the info from the php file, (or if I have to convert it, to whatever I have to convert it to.) How would I do this?
Crazydog is offline   Reply With Quote
Old 05-30-2005, 04:23 AM   PM User | #2
Coastal Web
Regular Coder

 
Coastal Web's Avatar
 
Join Date: Oct 2004
Posts: 225
Thanks: 12
Thanked 3 Times in 3 Posts
Coastal Web is an unknown quantity at this point
What you want to do is have the PHP script print/echo out the variables you want to feed into flash, just like you would if you were feeding the actionscript a text file...

just incase you're not 100% familiar with this practice, here's some information on sending data to actionscript from a text file:


http://www.actionscripts.org/tutoria...rs/index.shtml

so your .txt file is going to look something like this:

name=Samantha&hobby=flash&email_address=Samantha@guesswho.com


To feed the same exact variables to flash via php, you'd do the following:


PHP Code:
<?php

#
# lets say this file is called "php_variables.php"
##############

$name "Samantha";

$hobby "flash";

$email_address "Samantha@guesswho.com";

echo <<<
end;
name=$name&hobby=$hobby&email_address=$email_address
end
;

?>
Now back to your actionscript, you'd do the following:
loadVariables("http://www.yoursite.com/directory/php_variables.php", this);

I'm assuming you have a good understanding of loading variables into flash from a .txt file. If l'm wrong and you need more assistance or help, please feel free to post right back!

Samantha Gram.
Coastal Web is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:48 PM.


Advertisement
Log in to turn off these ads.