Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

can i pass variable from flash to php?

Posted on 2007-12-07
4
Medium Priority
?
913 Views
Last Modified: 2008-03-26
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?
0
Comment
Question by:markmchugh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 9

Accepted Solution

by:
sognoct earned 1000 total points
ID: 20426347
0
 
LVL 37

Assisted Solution

by:CyanBlue
CyanBlue earned 1000 total points
ID: 20427532
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...

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

Open in new window

0
 
LVL 16

Expert Comment

by:CWS (haripriya)
ID: 21188589
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.

cyberwebservice
Experts Exchange Cleanup Volunteer
0
 
LVL 1

Expert Comment

by:Computer101
ID: 21216926
Forced accept.

Computer101
EE Admin
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question