html form post to flex app

孤者浪人 提交于 2019-12-09 03:51:14

问题


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

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.

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

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


回答1:


There are two more methods I use.

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) Write login data to browser cookies and read it in swf (using calls to JavaScript in your page via ExternalInterface):

Accessing browser cookies from Flex

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




回答2:


Send your user's input to the server trough your form, if the login is successful, open your flex app.

Since it will be on the same session, your flex app will be able to get user’s information from the server and if it's there, bypass the flex app login.



来源:https://stackoverflow.com/questions/7207880/html-form-post-to-flex-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!