?
Solved

sending variables to cgi script from flash

Posted on 2003-03-07
7
Medium Priority
?
154 Views
Last Modified: 2010-04-03
Ok this may be simple or not, but I need to send a variable called ADD to a CGI script, but flash action script recognises this as a command rather than a variable ...

e.g:
 
set (add,"1")


cheers
eric
0
Comment
Question by:ericno7
[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
  • 3
  • 3
7 Comments
 
LVL 6

Expert Comment

by:henryww
ID: 8088348
how do u send the variable to the cgi?
can send the variables using "GET" instead of "POST"?

if so u can attache the variables in the querystring and that should solve the problem.


0
 
LVL 22

Expert Comment

by:rascalpants
ID: 8089025
you should use this to set the variable:

add = "1";  or add = 1;   //depending on if add is an int or string.

or if it is in the root of the movie:

_root.add = "1";  or _root.add = 1;


then just use a getURL("page.cgi?variable=add", "", "GET");

or getURL("page.cgi", "", "POST");


hope this helps...


rp



0
 
LVL 22

Expert Comment

by:rascalpants
ID: 8089044
and if you are in 4, then use:

Set Variable: "add" = "1";


rp
0
Independent Software Vendors: 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!

 
LVL 6

Expert Comment

by:henryww
ID: 8089180
hmmmm ....

"add" is a reserved word, a common that's why it didn't work.

i think if ericno7 is only send a few variable, just make a querystring like
url = "something.pl?add="+addVal+"&name1="+rp+"&name2="+henryw
// where addVal, rp & henryw is the variable names

and use getURL(url,"_blank") or whatever way u use to send ...
0
 
LVL 22

Accepted Solution

by:
rascalpants earned 200 total points
ID: 8089209
I don't think it matters if it is a reserved word...  I am pretty sure as long as it is declared as a variable, it can be used...  but the problem he is having looks like a combination of that and not setting the value to the variable correctly...


rp
0
 

Author Comment

by:ericno7
ID: 8090556
Thanks it was due to the way I was setting the variable I used :

set ("add","1")

seems to have done the trick.

thanks for the replies

ericno7
0
 
LVL 6

Expert Comment

by:henryww
ID: 8090587
hmmm ... interesting :)

no no no ... don't let rp get more pts ... no no ... LOL ...

0

Featured Post

Independent Software Vendors: 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

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
Suggested Courses
Course of the Month7 days, 20 hours left to enroll

765 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