Flash PHP

Hey all,

cant seem to get this to work, not sure why. I am following a kirupa tute which reads php file. Here is my code.

test.php:


<?php
$x = "abc";
print $x;
print "myVar=$x";
?>

test.fla

on my movie clip which contains a dynamic text field called “myVar”

[AS]
onClipEvent (load) {
loadVariables(“http://localhost/exp/bookorama/test.php”, this, “GET”);
}
[/AS]

Please help :slight_smile: and thanks

the way you have the script set up outputs a variables called ‘abcmyVar’ (the print $x line)… try this

<?php
$x = "abc";
print $x;
print "&myVar=$x";
?>

dang, no still not working, any more ideas? possibly file permissions? i set full permissions just test.

try this…

onClipEvent (load) {
        loadVariables("http://localhost/exp/bookorama/test.php", this);
}

and… are you sure the variable ‘myVar’ is placed IN that movieclip? :slight_smile:

yes im sure the vaiable is myVar. this still doesn’t work. i’m boggled.

if you get a chance my source files are here:
http://digitalosophy.com/exp/bookorama/test.zip

thanks again man im goin nuts

i don’t really have anytime right now, i’ll see them as soon as i get to ;(

thank you very much

Wut up holmes?

In the fla file you put in the zip you had the text box named “Name”

But you named the variable in the PHP file “myVar”

If they matched then it would work fine…

File in Action: http://www.bluefinatlantic.com/egTest/test.html

Zip file: http://www.bluefinatlantic.com/egTest/DigFix.zip

lol jubba my man, always comin through when i need him. i was gonna harass you last night late night but i figured i’d give ya a break. thanks a lot man, really i appreciate it. now i can mve on to step 2, grabbing ht info from mysql db.

:slight_smile:

talk to ya later mang. :slight_smile:

yeah no problem. Anytime I am home feel free to IM me. I told you that I am more than happy to help you out. I’m working on a database driven Flash guestbook for a client of mine also… so that should be fun.

They have me working nights now tho, so it might be harder for you to reach me. Usually 5pm - 1am or so, so if you need something just leave an IM and i’ll get back to you when I can.

I’m in the process of looking for another job… something with day shifts…

cool good luck!