使用 ActionScript 2.0 POST 登录 [英] POST Login with ActionScript 2.0

查看:17
本文介绍了使用 ActionScript 2.0 POST 登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为客户创建了一个非常基本的 Flash 网站,但在编写他想要的客户登录功能时遇到了问题.目前,如果我导航到该站点并单击客户端登录",它会将我带到一个登录页面.我需要它的工作方式是——在 Flash 中,使用 ActionScript 2.0——让用户输入他们的用户 ID 和密码并点击登录,这将 POST 变量提交给客户端登录网站的表单操作.

I have created a pretty basic Flash website for a client and am having an issue programming a Client Login feature that he would like. Currently, if I navigate to the site and click Client Login, it takes me to a login page. The way I need this to work is -- within the Flash, using ActionScript 2.0 -- have the user enter their UserID and Password and click to login, which submits POST vars to the form action of the Client Login website.

从不同的域这样做是否可能/合法?假设这是可能的,我将如何去做?

Is this possible/legal to do from a different domain? How would I go about doing this, assuming it's possible?

推荐答案

试试这个:

myVars = new LoadVars();
myVars.username = username.text;
myVars.password = pwd.text;
myVars.onLoad = function(success) {
        trace("yay!");
    else {
        trace("try again");    
    }
}
myVars.sendAndLoad("login.php", myVars, "POST");

这篇关于使用 ActionScript 2.0 POST 登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆