473,699 Members | 2,078 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

talking between flash and php

Hi Folk

I am new to flash (just so you don't think I am completely stupid)

I have a flash file that I want to execute a short action script and then
load a PHP file in the its own window, while posting some of the variables
to this new script:

e.g.
A
B
C
//below is where I get stuck
post variables:
x = 1;
y = 2;
open new url = 'test.php' with post variables
//end

in test.php I then want to be able to show those variables as follows:

<?php
echo $_POST["x"];
echo $_POST["y"];
?>

I have the ABC, but I need the correct syntax for the last few lines in
flash.

TIA

- Nicolaas



Oct 4 '05 #1
2 1624
On Tue, 4 Oct 2005 13:05:20 +1300, "windandwav es" <wi*********@co ldmail.com>
wrote:
I have a flash file that I want to execute a short action script and then
load a PHP file in the its own window, while posting some of the variables
to this new script:

e.g.
A
B
C
//below is where I get stuck
post variables:
x = 1;
y = 2;
open new url = 'test.php' with post variables
//end

in test.php I then want to be able to show those variables as follows:

<?php
echo $_POST["x"];
echo $_POST["y"];
?>

I have the ABC, but I need the correct syntax for the last few lines in
flash.


If you're sending the values with no regard for server response, you can append
the values to the URL in Flash using GET syntax:
www.site.com/page.php?x=1&y=2

If you need bidirectional communication, look into the Flash LoadVars and
LoadVariables objects.
http://www.actionscripts.org/tutoria..._and_loadVars/

HTH.
Oct 4 '05 #2
us****@isotopeR EEMOOVEmedia.co m wrote:
On Tue, 4 Oct 2005 13:05:20 +1300, "windandwav es"
<wi*********@co ldmail.com> wrote:
I have a flash file that I want to execute a short action script and
then load a PHP file in the its own window, while posting some of
the variables to this new script:

e.g.
A
B
C
//below is where I get stuck
post variables:
x = 1;
y = 2;
open new url = 'test.php' with post variables
//end

in test.php I then want to be able to show those variables as
follows:

<?php
echo $_POST["x"];
echo $_POST["y"];


I have the ABC, but I need the correct syntax for the last few lines
in flash.


If you're sending the values with no regard for server response, you
can append the values to the URL in Flash using GET syntax:
www.site.com/page.php?x=1&y=2

If you need bidirectional communication, look into the Flash LoadVars
and LoadVariables objects.
http://www.actionscripts.org/tutoria..._and_loadVars/

This is what I came up with in Flash:

stop();
var ses:string;

//create the local Shared Object
myLocalSO = sharedobject.ge tLocal("hookie" );

if(_root.destro y) {
myLocalSO.data. name = "destroyed" ;
}
else {
//if cookie already exists then get ses from cookie
if (myLocalSO.data .name.length == 32) {
ses = myLocalSO.data. name;
getURL("index.p hp", "_self", "GET");
}
//if cookie does not exist then make it
else {
//get parameter from query string (INPUT)
//if(_root.PHPSES SID){
// ses = _root.PHPSESSID ;
// getURL("episode .php", "_self", "GET");
//}
//if(ses.length <> 32) {
// ses = "testcookie " + getTimer()
//}
myLocalSO.data. name = _root.PHPSESSID ;
}
ses = myLocalSO.data. name;
getURL("voter.p hp", "_self", "POST");
}
Oct 4 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
4768
by: Gustav Medler | last post by:
Hello, there is a known problem with Opera and the execution of content shown in <NOSCRIPT> tag. Everythings works fine, if there is only one simple script like: http://www.dr-wald.de/test/Opera-NOSCRIPT.html Switching off Javascript will show the alternative content. Javascript enabled will only show the JS-content, _not_ the <NOSCRIPT> content.
9
8591
by: Keith Rowe | last post by:
Hello, I am trying to reference a Shockwave Flash Object on a vb code behind page in an ASP.NET project and I receive the following error: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). On the aspx page I have the object tag as follows:
8
4058
by: Ben Bartsch | last post by:
Looking for opinions on the use of Flash with ASP.NET. Has anyone here seen or conducted any implementations of Flash that are actually useful or otherwise complement ASP.NET?
1
2237
by: dscriv | last post by:
Hello, I have Netscape 8.0.4 (in Firefox mode) and Flash 8.0.24.0. I also have IE and Firefox installed. If I go to this page, which contains a Flash detection movie: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_15507 all three browers successfully run the Flash movie and show the same version of Flash to be installed. However, if I try to use a javascript Flash detection solution, it does
115
13297
by: post2google | last post by:
I was thinking about where to go for lunch the other day, so I went to hardees.com to see what the menu looked like these days. What comes up is a big note that my flash version is not new enough so I can't use the site. What complete losers! When are businesses going to understand that the purpose of a web site is to communicate with customers or business parterns and NOT so your "web master or "web engineer" can show off what they...
8
5892
by: Neo Geshel | last post by:
Greetings. BACKGROUND: My sites are pure XHTML 1.1 with CSS 2.1 for markup. My pages are delivered as application/xhtml+xml for all non-MS web clients, and as text/xml for all MS web clients (Internet Explorer). My flash content was originally brought in via the “flash satay” method, but I have since used some server-side magic do deliver one <objecttag
1
2727
by: critchey1 | last post by:
Hey everyone, i've been playing around with trying to get some scripts to work with detecting whether flash player is installed on your computer or not. I found a flash detection kit on the adobe site which had a client side detection method using javascript. Basically what im trying to get it to do is if flash player is installed, use the style property display="none" to hide my static content, and if flash is not installed hide the flash...
2
8078
dream party
by: dream party | last post by:
Inserting a Flash (SWF, FLV) file into HTML web page is already an old and familiar thing to all of us. It is a rather non-flexible thing that just to edit some options in the template. However, I did not understand some parameters totally in the HTML tag. These days when I was surfing the Internet I have found some comprehensive introduction to these two tags. I read it and conclude it with my own words; I think it will be useful to us, so I...
0
8706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8630
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8944
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7786
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6550
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5889
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4638
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3075
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2364
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.