What do we need for flash 10 development?
I'm looking to do some development in flash 10, specifically for the new file api (reading/writing files on the user's local machine). What do I need to develop for flash 10, just Flash cs4?:
http://tryit.adobe.com/us/cs4/flash/c/?sdid=ETJMX&
or is there some other ide? All I'm really interested in doing is:
Not sure if I can get away with the free adobe air thing for this? I need it to run in a webpage but I don't intend to do any more development outside of the above,
Thanks
If you want a free solution:
Download Flex SDK, then download FlashDevelop
It's perfect for coding.
As security restriction, every time you want to save a file it pops up the Save As dialog box asking the user where to save it. For loading, on user input, you can call the FileReference.browse(); You can learn more about this class, here.
Also, you can use AIR to save the file: (AIR is flash compiled for desktop, you can't use it for web)
import flash.filesystem.*;
import flash.events.Event;
var docsDir:File = File.documentsDirectory;
try{
docsDir.browseForSave("Save As");
docsDir.addEventListener(Event.SELECT, saveData);
}catch (error:Error){
trace("Failed:", error.message);
}
function saveData(event:Event):void {
var newFile:File = event.target as File;
var str:String = "Hello.";
if (!newFile.exists){
var stream:FileStream = new FileStream();
stream.open(newFile, FileMode.WRITE);
stream.writeUTFBytes(str);
stream.close();
}
}
Yes, you have all you need to create Flash 10 SWFs with the Flash CS4 authoring tool, however:
As AaronLS points out, Flash CS4 is not a particularly good code IDE (it is more aimed at designers). As an alternative to Flex Builder, there is an open source Flash IDE, called FlashDevelop, that is quite good. It still requires CS4 (or some other AS3 compiler, like the Flex SDK, which is free) to compile the code, but you get the benefit of a nicer coding environment.
For such a simple task that only involves code (no design), the Flash authoring environment might be overkill, although it is the simplest way to proceed.
You might also want to check out haXe (a language), which can compile to SWFs directly, or compile to AS3 code. For this simple application, I would suggest using haXe, since it is free and easy to use for simple SWFs (no mucking about with MXML, etc). However, haXe is not everyone's cup of tea.
您可以使用Flex Builder,而不是更真正的IDE和更多面向程序员的方式,因为Flash CS4更加面向设计师。
链接地址: http://www.djcxy.com/p/17742.html上一篇: tahoma文本加载与客户端计算机上的加载方式不同
下一篇: 我们需要什么Flash 10开发?