简体   繁体   English

ActionScript 3 JEOPARDY Flash游戏

[英]ActionScript 3 JEOPARDY flash game

I would like to make an AS3 JEOPARDY like flash game, but I can't figure out how to feed the published swf with an external sheet containing questions - xml or txt or something similar... Could somebody help me with some useful ideas please? 我想制作一个类似Flash游戏的AS3 JEOPARDY,但我不知道如何用包含问题的外部表(xml或txt或类似的东西)来提供已发布的swf。有人可以帮我一些有用的想法吗? ? Or some of you pros - if you feel like it - you could even elaborate and provide a more detailed description :) thank you all in advance 或您中的某些专业人士-如果您愿意-甚至可以详细阐述并提供更详细的描述:)预先谢谢大家

Use URLRequest to load external data into your swf. 使用URLRequest将外部数据加载到SWF中。

And don't use XML, better take JSON format: faster to load, easier to read by your program 而且不要使用XML,最好采用JSON格式:加载速度更快,程序更易于阅读

(with XML you often have to read and then transform data, with JSON you just load and are done). (使用XML,您通常必须先读取然后转换数据,而使用JSON则只需加载并完成)。

Also, I've just remembered that the ActionScript: The Definitive Guide book comes with a Jeopardy flash game example. 另外,我还记得《 ActionScript:权威指南》一书中附带了Jeopardy Flash游戏示例。

在此处输入图片说明

One possibility is to use a web service that you host, as opposed to an XML document that's actually out on the Internet. 一种可能性是使用您托管的Web服务,而不是Internet上实际存在的XML文档。 At least when you're using MXML, web services tend to be pretty easy to use in AS3. 至少当您使用MXML时,Web服务在AS3中往往非常易于使用。 Using a web service, instead of an XML page or text page or something, would make it a little less trivial for people to cheat (especially if the web method requires that a password be supplied as an argument). 使用Web服务而不是XML页面或文本页面之类的东西,会使人们作弊变得微不足道(特别是如果Web方法要求提供密码作为参数的话)。

external meaning? 外部意义? You have to access a saved questions and answers to the games? 您必须访问游戏的已保存问题和答案? If that's the case then xml is great for it. 如果是这种情况,那么xml非常适合。 You can visit http://www.flashgameu.com/ it contains that tutorial and a sample for a question with timers. 您可以访问http://www.flashgameu.com/ ,其中包含该教程和有关计时器问题的示例。 And look for the book source files. 并查找书籍源文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM