all groups > flash (macromedia) > december 2003 >
You're in the

flash (macromedia)

group:

how to call php function from flash ?


how to call php function from flash ? TheBimmer
12/29/2003 11:01:27 PM
flash (macromedia):
Hi again ...

thanx for the past support...

now how can i do this : this is the idea ...

have an interval in flash , it is going to call a php function that exist in the same page, or in an other page !! ( dont know if it differs) ... this function checks the cookie if it has expired or not,

I will return to the flash movie even true or false, I have learned how to send vars from php to flash , BUT HOW DO I CALL PHP FUNCTIONS FROM WITHIN FLASH ?!! .....

btw. am i thinking right ?!



Re: how to call php function from flash ? richuno
12/29/2003 11:46:11 PM
create a .php page that checks the cookie, then prints the variable=True or variable=false as a text string.

from within the Flash movie...

loadVariables("script.php", _root.moviename, "POST");

this imports the variable=boolean into the movie

BELOW: a thread with more details

Developing interactive Flash and ASP pages for 'Real World' application.

Referring URLs
http://webforums.macromedia.com/flash/messageview.cfm?catid=194&threadid=748856



Re: how to call php function from flash ? TheBimmer
12/30/2003 10:28:49 AM

OK , but shouldn't i call a function in the php ?!?!

what i am thinking of is to make an interval in actionScript to call that php function each 30 seconds, so i need the php to recheck the cookie status...


Or can i make that interval check inside the php itself ?!

thanx




Re: how to call php function from flash ? richuno
12/30/2003 7:46:16 PM
put the loadVariables call inside a clip all its own and add enough frames to make the clip loop every 30 seconds. Each time the clip hits the keyframe with the loadVariables, it calls the php page and the cookies get checked again.

If you ever use vbScript, think of the loadVariables as a Server.Execute statement.

AddThis Social Bookmark Button