Parameters in flash

Posted on 2003-11-01
Last Modified: 2010-04-03
I have flash-button that on click navigates to some url. But I want to pass a parameter (like user id, for example) to the url. How can I do it?
Question by:jalonsoa
LVL 27

Accepted Solution

negatyve earned 250 total points
ID: 9663165
getURL("page.asp?userID=" + variable, "_self");

for example..

Expert Comment

ID: 9760250
getURL("PAGE.ASP", "_self", "GET");

Expert Comment

ID: 9760265
So if you pass a var:

var ID="ID22";

the url would be ....

hope this helps

Expert Comment

ID: 9833735
With the      getURL("page.asp", "_self", "GET")

All the form fields in the browser get sent. Be careful not to send unwanted data along with the userid. GET is also important as some browsers do not send data via the POST property properly. Flash plugin goof up.

If you have multiple variables in the form use

getURL("page.asp?" add variablename, "_self");

Assisted Solution

abdulqabiz earned 250 total points
ID: 11030185

getURL(..) is ofcourse is mostly used method. But Flash MX has easier to do with LoadVars. We have control over the way we send data. We can choose which varaibles to send or not...


form_lv = new LoadVars();

//variables and their values to be sent to server
form_lv.variable1 = "somevalue";
form_lv.variable2 = "somevalue2";

//Use GET if you want to send it as query string..  
form_lv.send("http://your-site/script.asp", "_self", "POST");  

more help on this can be found at

Hope it helps,



Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Link puzzle piece images together and change color on hover 2 429
blocked plugin flash 5 111
File drag and drop 6 131
Flash ActionScript 6 43
This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
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 what frame rate is, how to control it and what effect it has on the video.

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now