如何保存在 Flash 中使用 MovieClip 创建的切换状态。如何将状态保存在变量中并传递给 PHP,并保存为 XML?

发布于 2024-09-15 17:20:50 字数 332 浏览 2 评论 0原文

我的 Flash Stage 上有 MovieClip,当单击它们时,它们会打开/关闭。我的目标是,当用户单击“开”/“关”时,然后离开 Flash 网站,另一个用户可以访问该网站,并看到该 MovieClip 的状态为“开”/“关”。

我需要一种方法,当用户切换开/关时 - 该状态保存在变量中 - 传递到 PHP - 保存在 XML 文件中 - 然后当完成时 - Flash 调用一个函数来更新--读取XML文件--查看是否需要更新MovieClip切换按钮的ON/OFF状态。

多人将能够访问此 Flash 站点,并切换(开/关)舞台上的对象。当不止一个人进行切换时,这些人应该立即看到正在切换的对象(开/关)。

I have MovieClips on my Flash Stage that when clicked on--they toggle ON/OFF. My goal is that when a user clicks either ON/OFF--then leaves the flash website--another user can visit the site--and see that state of that MovieClip was either left ON/OFF.

I would need a way that when a user toggles ON/OFF--that state is saved in a variable--passed onto PHP--saved in an XML file--and then when that is done--Flash calls a function to update--to read the XML file--see if it needs to update the ON/OFF state of the MovieClip toggle button.

Multiple people would be able to go to this flash site--and toggle (ON/OFF) the objects on the stage. When more than one person is toggling--those people should instantly see objects being toggled (ON/OFF).

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

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

发布评论

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

评论(1

孤寂小茶 2024-09-22 17:20:50

要立即看到对象被打开或关闭,实际上需要的时间比这多一点。服务器必须通知闪存按钮已被切换。如果将应用程序状态保存在文本文件中,则仅当应用程序加载该文件时状态才会更新。

如果有很多用户切换按钮,听起来就像有很多服务器调用。您可以使用远程 SharedObject,但需要 Flash Media Server。本地 SharedObject 可以工作,但仅适用于一种浏览器,这意味着用户可以翻转开关并返回到离开时的应用程序。

无论如何,无论您采用什么解决方案来保存对象数据,您都需要让对象从公共对象获取其状态,以便更新此对象将更新每个对象状态。同样,每次特定对象状态发生变化时,都应该更新这个公共对象。

然后这个对象可以作为 SharedObject 保存/检索,或者保存在文本文件 (JSON ) 或 XML 中......

To instantly see objects being toggled on or off would take a little more than this actually. the server would have to inform flash that a button has been toggled. if you save your application state in a text file , the state will only be updated when the application loads the file.

If you have many users toggling the buttons, it sounds like a lot of server calls. You could use a remote SharedObject but you would need Flash Media Server for that. Local SharedObject would work but only for one browser, meaning a user could flip switches and return to the application as she left it.

In any case , whatever your solution to save your objects data, you would need for your objects to get their status from a common object so that updating this object would update each object status. Similarly , each time a specific object status changes, it should update this common object.

Then this object can be saved/retrieved as a SharedObject, or saved in a text file (JSON ) or as an XML...

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