HOw to get value post from flash MX in asp

Hello, I want to post variable from flash to asp. I have added on one button the action like

on (release) {
getURL(“variable.asp?screenx=_root.scx&screeny=_root.scy”,’’’_blank");
}

where scx and scy is the position of the textfield on the stage. And I can trace the value of scx and scy without any problem.

Then I have in the asp page for receiving the value

<%
dim xpos,ypos
xpos=Request.querystring("screenx");
ypos=Request.querystring("screeny");


%>

But when I use response.write to show the xpos and ypos, it only show _root.scx and _root.scy but not the values of them.

How should I modify the code then? THanks!

[AS]getURL(“variable.asp?screenx=”+_root.scx+"&screeny="+_root.scy, “_blank”);[/AS]
Try that…

Although I’d use the LoadVars object. It’s more fun… :stuck_out_tongue:
[AS]var lv = new LoadVars();
lv.screenx = _root.scx;
lv.screeny = _root.scy;
lv.send(“variable.asp”, “_blank”, “POST”);[/AS]
And please do NOT crosspost. :-\

IF using loadVars.

What should I write in asp to receive those variables and save them to database. Thanks!

<%
Dim xpos, ypos
Set xpos = Request.Form("screenx");
Set ypos = Request.Form("screeny");
%>

Thanks and I got it now, but how can I send the variables’ values to database(MS SQL 2K) using ASP?

wow kax, didn’t know you’re into ASP too… just another reason to hate you :trout:

  • SBUH
    Usually, I’d learn how to do it and tell you, but this time I’m really busy here. :-
    You could try your luck in the Server-Side forum and/or run a search on google.com.
    There’s also a list of tutorials and resources in the sticky thread in the Server-Side section.

  • ahmed
    Haha - I’m not. Well, I know a little bit (I repeat, just a little bit) of everything (ASP, ASP.NET, PHP, JavaScript, VB, C++ and Java), but ActionScript is my passion. =)

wow… so many reasons to hate kax… :stuck_out_tongue:

[size=1]sorry for spamming the thread… :slight_smile: [/size]

Many thanks to Kax!

You SSAS genious… I hate you more!! :hair:

I’ve been wanting to learn SSAS, but I have no money to buy my licenses right now… :frowning:

[SIZE=1]and sorry for spamming up this thread even more… :whistle:[/SIZE]

[EDIT]You’re welcome, SBUH. Hope you can figure it out. =)[/EDIT]

lol… im not an SSAS genius, i just got started :stuck_out_tongue:
The developer license is free, only draw back is that it supports 5 connections only (which is still not bad when you’re merely building apps :))

I must have missed that part… I did not know that!! :!:

I guess I will get a chance to learn after all. YAY!! =)

SBUH
Do you know how to open the connection and recordset for writing in asp? I can help you tomorrow if you get stuck.

Cheers

gak gak gak,

Thanks and I know how to connect with database, but not clear with recordset. so, can you tell me more things about that and how to use during saving process?

www.asp101.com

look under the samples section

Thank you all !