Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

can i pass variable from flash to php?

Posted on 2007-12-07
4
Medium Priority
?
917 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
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
Suggested Courses

578 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