I want to make my adobe air application that uses some data like (xml, png, ...) works only if the CD ROM exist ! means after installation the user must put the CD and run the app from the icon on desktop ! is it possible with flash/as3 ? thank you

有帮助吗?

解决方案

you can do a little trick, at the launch of the app you can search for a file on that cdrom and show an alert if you don't find it. Here a simple way of getting all drives of the user computer:

var list:Array = File.getRootDirectories();

the list array contain File objects relative of all drives in the computer, afeter that you can search for a file inside the root of the drive or somewhere else.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top