开发者

drink calculator for flash

开发者 https://www.devze.com 2023-03-29 22:21 出处:网络
My charity organisation has asked me to produce a alcohol units calculator just like the one illustrated on the website http://www.drinkaware.co.uk/tips-and-tools/drink-diary/.

My charity organisation has asked me to produce a alcohol units calculator just like the one illustrated on the website http://www.drinkaware.co.uk/tips-and-tools/drink-diary/.

I am going to use flash with action script. My question is as I am new to action script

Will i need a database to link the alcohol beverages to in the drop down menus'

开发者_高级运维If so how is this done or is there a easier way to achieve.

Any tutorial links or advice would be very much aprechiated.

Thanks

Peter


You may not necessarily need a database, as there are a number of ways this could be done. If you're interested in keeping the data outside the flash file, you could use a database.

Connecting Flash to an e database can get pretty complex though, and often there are better options, particularly when the project is a fairly small one like this.

I think XML is a nice option for your data in this case. You could store all the drink data in an XML file and then write AS code to populate the combo boxes with data from the XML.

This will help with creating the drop-down menus (ComboBoxes): http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/controls/ComboBox.html

And here's some more info on using XML to store your data:

http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7e6a.html http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7e71.html

It could all be coded into the Flash piece also, without using a database or XML, but that's generally not considered good practice since it makes updating the data somewhat more difficult.

0

精彩评论

暂无评论...
验证码 换一张
取 消