html 表单发布到 flex 应用程序 [英] html form post to flex app

查看:27
本文介绍了html 表单发布到 flex 应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基本完成的 flex 应用程序,它使用 Zend AMF 连接/提供数据.

I've got a flex app that is basically completed it uses Zend AMF to connect/supply data.

我的应用程序确实有一个登录屏幕,它似乎工作正常.现在我想在我的网站上添加另一个登录表单,允​​许用户输入用户名/密码.提交表单时应将数据传递给 flex 应用程序并绕过应用程序的登录.

My app does have a login screen which seems to work fine. Now I'd like to add another login form on my site that would allows users to enter in username/password. When submitted form should pass the data to the flex app and bypass the application's login.

我知道如何做到这一点的唯一方法是在 url 中传递用户输入,这显然不理想.

The only way I know how to do this is by passing the users input in the url which is obviously not ideal.

如何发布表单数据以在 flex 中用作变量?

How can I post the form data to use as variables in flex?

推荐答案

我还使用了另外两种方法.

There are two more methods I use.

1) 通过嵌入的 html 将参数传递给您的 swf,并在加载时在 swf 中读取它(使用 FlashVars):

1) Pass parameters to your swf via html embed and read it in swf on load (using FlashVars):

http://kb2.adobe.com/cps/164/tn_16417.html

2) 将登录数据写入浏览器 cookie 并在 swf 中读取(通过 ExternalInterface):

2) Write login data to browser cookies and read it in swf (using calls to JavaScript in your page via ExternalInterface):

从 Flex 访问浏览器 cookie

我使用了上面问题的检查答案中的库,它正在工作.

I used library from checked answer to the question above, it's working.

这篇关于html 表单发布到 flex 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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