有什么方法可以识别 Flash/Actionscript 3 中的唯一用户吗?

发布于 2024-09-06 06:30:11 字数 185 浏览 3 评论 0 原文

我正在尝试使用 Actionscript 3 在 Flash 中制作投票/民意调查应用程序。有没有办法生成每个用户唯一的特定 ID?

我能想到的唯一其他选择是使用 IP 地址,这在许多情况下(大学校园、共享 Internet 访问等)并不理想。

每次在同一台 PC 上运行时,它都需要是相同的数字,但对于每个用户来说都不同。

I'm trying to make a vote/poll application in Flash using Actionscript 3. Is there any way to generate a specific ID that is unique to each user?

The only other option I can think of is using the IP address, which is less than ideal in many cases (college campuses, shared Internet access, etc.).

It needs to be the same number every time it is run on the same PC, but different for each user.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情丝乱 2024-09-13 06:30:11

您有两个选择:

1) 远程共享对象,这是表示 Flash Cookie 的一种奇特方式,它每次都会记住浏览器。

或者,您可以设置某种后端登录系统(因为您希望每个用户都是唯一的,即使在同一台计算机上,这听起来像是您必须做的)。这不仅仅是 flash - 您需要与 PHP 等服务器端脚本语言集成(使用 AMFPHP 或 ZendAMF 集成很容易,我相信您可以在 http://www.gotoandlearn.com)并在那里处理您的用户内容。

你必须将其连接到某种登录 - 必须有一种方法让用户识别自己的身份,否则整个事情就没有意义了。

如果我是你,我会首先放置一个登录屏幕,绑定到 PHP 后端并使用 cookie 来记住你有人登录 - 但给他们注销的选项。然后,您只需将登录的用户与某种唯一键关联起来(例如 MySQL 数据库中的用户索引),就可以了。

取决于您对闪存以外的技术的适应程度,这些技术可能听起来简单或复杂,但实际上不会花费您太长时间。如果您对 PHP 或 MySQL 一无所知,您可以在 google 上搜索“PHP 用户登录”,这应该可以帮助您入门。如果您有任何具体问题,请告诉我!

You have two options:

1) A Remote Shared Object, which is a fancy way to say a Flash Cookie, which will remember the browser every time.

Alternately, you can set up some sort of back-end login system (since you want unique to every user, even on the same computer, this sounds like what you'll have to do). This is more than just flash - you'll need to integrate with a server-side scripting language like PHP (integration is easy with AMFPHP or ZendAMF, I believe you can find some tutorials on http://www.gotoandlearn.com) and handle your user stuff there.

You're going to have to wire this up to some sort of login - there has to be a way for users to identify themselves, or the whole thing is pointless.

If I were you I'd put a login screen first, tie to a PHP back-end and use cookies to remember that you have someone logged in - but give them the option to log out. Then you simply associate the logged-in user with some sort of unique key - like the user index in a MySQL database - and you're all set.

Depending on how comfortable you are with technologies beyond flash that may either sound simple or complicated, but it really shouldn't take you too long. If you don't know anything about PHP or MySQL you can google "PHP User Login" and that should get you started. Let me know if you have any specific questions!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文