Solved

Parameters in flash

Posted on 2003-11-01
7
264 Views
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?
0
Comment
Question by:jalonsoa
7 Comments
 
LVL 27

Accepted Solution

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

for example..
0
 

Expert Comment

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

Expert Comment

by:zakaz
ID: 9760265
So if you pass a var:

var ID="ID22";

the url would be .... http://www.yoursite.com/PAGE.asp?ID=ID22

hope this helps
0
 
LVL 1

Expert Comment

by:Rohitmr
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");
0
 
LVL 5

Assisted Solution

by:abdulqabiz
abdulqabiz earned 250 total points
ID: 11030185
Hi,

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...


<code>

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");  
</code>

more help on this can be found at http://livedocs.macromedia.com/flash/mx2004/main/12_as301.htm#236883


Hope it helps,

Regards,
Abdul

0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
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…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

762 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

21 Experts available now in Live!

Get 1:1 Help Now