Solved

Parameters in flash

Posted on 2003-11-01
7
269 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
[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
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

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

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…
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

688 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