can i pass variable from flash to php?

I have a swf file, that contains 4 buttons, each of them call a seperate but almost similar php file. I'd rather just call one php file, is it possible to do this without passing a variable through the address bar?
Who is Participating?
CyanBlueConnect With a Mentor Commented:
You basically need to use LoadVars() object to make a call to the PHP script...  If you do that with sendAndLoad() function, a new browser will not open and pass data between Flash and PHP...

A simple sample would be something like this...

someButton_mc.onPress = function ()
   var _lv:LoadVars = new LoadVars();
   _lv.onLoad = function (ok:String)
      if (ok)
         trace("Data send & loaded...");
         trace("Problem accessing data...");
   _lv.sendAndLoad("file.php", _lv, "POST");

Open in new window

CWS (haripriya)Commented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
   Split: sognoct {http:#20426347} & CyanBlue {http:#20427532}

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

Experts Exchange Cleanup Volunteer
Forced accept.

EE Admin
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.