Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, I've got a simple form in Fl 1

Status
Not open for further replies.

MajorTechie

Programmer
Mar 20, 2002
30
0
0
CA
Hi,

I've got a simple form in Flash and I would like to send the variables to an asp page. I have a submit button with the following action script:

[red]
on (release) {
loadVariablesNum ("form.asp", 3, "POST");
unloadMovieNum (2);
}
[/red]

Could someone please point me in the right direction so that Flash sends the variables properly?

Thanks
 
Something like this :

on (release) {
loadVariablesNum ("form.asp?myVar1=" add _root.foo add "&myVar2=" add _root.foo2, 3, "POST");
unloadMovieNum (2);
} Regards

Big Bad Dave

logo.gif


davidbyng@hotmail.com
 
'add' is just like javascript '+' eg :

<script language=&quot;JavaScript&quot; type=&quot;text/JavaScript&quot;>
function foo(var){
alert(&quot;Hello there &quot; + var + &quot; How are you?&quot;);
}
</script>

and _root.foo is your variable (it probably won't be called foo and it might not be on the root level) Regards

Big Bad Dave

logo.gif


davidbyng@hotmail.com
 
Checked this out guys :

Add

Operator; concatenates (combines) two or more strings. The add operator replaces the Flash 4 add (&) operator; Flash 4 files using the & operator are automatically converted to use the add operator for string concatenation when brought into the Flash 5 authoring environment. However, the add operator is deprecated in Flash 5, and use of the + operator is recommended when creating content for Flash Player 5 or Flash Player 6. Use the add operator to concatenate strings if you are creating content for Flash 4 or earlier versions of the Player.

Source : Flash MX reference that comes with the program.

Using this your code would look like :

on (release) {
loadVariablesNum (&quot;form.asp?myVar1=&quot; + _root.foo + &quot;&myVar2=&quot; + _root.foo2, 3, &quot;POST&quot;);
unloadMovieNum (2);
}
Gary Haran
 
Xutopia...
Tu te mets à jour en lisant ton dictionnaire AS? Regards,

new.gif
 
*kicks himself for droping french in grade 9*

i'm canadian, you'd think i could retain more then just oui.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top