God! Adobe CS4 Master Collection Download
OMG. I’m so out of touch with the times… The preview release of 《Adobe CS4 Master Collection》(Adobe Creative Suite 4 Master Collection Pre-Release) [ISO] is already available for download on eMule....
OMG. I’m so out of touch with the times… The preview release of 《Adobe CS4 Master Collection》(Adobe Creative Suite 4 Master Collection Pre-Release) [ISO] is already available for download on eMule....
In AS3, an addEventListener listener automatically passes an event object argument to the handler function, but it can’t pass any other arguments. If you want to pass arguments to an event handler, here’s a way to do it: see the code:var sayHello:String = “欢迎光临www.FlashJ.cn -Flash,Ria技术博客”; btn1.addEventListener(MouseEvent.CLICK,function (e:MouseEvent){clickHandlerWithArg(e,sayHello)}); function clickHandlerWithArg(e:MouseEvent,arg:String):void { var out:String= e.target + “发出事件(有参数) :” + arg; trace(out); }
Quick Start Examples:Example 1. Reading XML var testXML:XML; var file:File = File.documentsDirectory.resolvePath(“Mousebomb/test.xml”); var fileStream:FileStream = new FileStream(); fileStream.open(file, FileMode.READ); testXML = XML(fileStream.readUTFBytes(fileStream.bytesAvailable)); fileStream.close(); The example uses the readUTFBytes() method to read the content and convert it into an XML object.
What is a File object? A File object is a pointer to a file or directory in the file system. For security reasons, it’s only available in AIR. What can a File object do? Get specific directories, including the user directory, the user documents directory, the directory from which the application was launched, and the application directory Copy files and directories Move files and directories Delete files and directories (or move them to the trash) List the files and directories in a given directory Create temporary files and folders Create directories Read file information Get file system information
On May 17, I ran into a frustrating situation with the Fanfou AIR client: “after AIR opens an XML file, it caches it, so it can’t refresh in time.” As I’d imagined it, I just needed to click a button to refresh the network data, but the data was cached — AIR preferred the local data and wouldn’t update in time. Very annoying. In the end I had to resort to “unorthodox measures” — To deal with this kind of failure to refresh due to caching, there’s a trick: add a parameter to the requested URL. For example, if you’re requesting a.xml?user=b, then every time you need to refresh, change it to request a.xml?user=b&r=1. Increment the value of r by 1 each time, and with this little hack you can get the data to refresh. Today I poked around the official site and found that URLRequest in AIR apps has two properties that can handle this (finally, something that stands up for us common folk~). They are:
AIR lets us build applications that work with the file system. Using the classes provided by the Adobe® AIR™ file system API, you can access the host’s file system — reading, managing, creating, and deleting directories and files, writing data to files, and more. I’ve broken working with the file system down into three parts of AIR file operations: AIR file basics (below) Using the File object to work with files and directories Using the FileStream object to read and write files Language reference for the relevant classes flash.filesystem.File flash.filesystem.FileStream flash.filesystem.FileMode
Today a guy in the FLEX group brought up AIR cache clearing, so I went wandering through the official docs again, and while I was at it I came across AIR’s URL schemes. Two of them I’d never used: app: and app-storage:. Here are the details: The standard URL schemes below are supported in any security sandbox in AIR: http: and https: — these two are of course web URLs. file: — this one is of course a local file URL. The schemes below are used by content running in the application security sandbox: app: Use this to specify a path relative to the top level of the application installation directory (that is, the application source directory) — the directory that contains the application descriptor file. For example, the one below points to the resources subdirectory under the application’s top-level directory: app:/resources
Searching for the term “RIA” on Baidu Baike gives you http://baike.baidu.com/view/706341.htm, which says What is RIA? RIA (Rich Interface Applications), rich interface applications, commonly known as fat client. But the RIA I remember is Rich Internet Application — rich internet application. That difference startled me. When exactly did RIA pick up this other explanation, Rich Interface Applications?
When you use httpService in Flex to read XML from a different domain (such as http://xml.weather.yahoo.com/forecastrss), you get a Security error accessing url error. But in the debug folder (bin-debug by default) it reads just fine. This is really annoying — I’m sure plenty of people have been tripped up by this security issue. Why does it only work in the debug folder? It turns out the bin-debug folder works only because [系统盘]:Documents and Settings[用户名]Application DataMacromediaFlash Player#SecurityFlashPlayerTrustflexbuilder.cfg sets it as trusted automatically. At actual runtime, it’s blocked by security. In other words, what we need to do is solve the security-block problem. So how do we fix it?
For file association management, the flash.desktop.NativeApplication class in AIR provides 4 methods: isSetAsDefaultApplication(extension:String):Boolean returns whether the current AIR application is the default way to open the specified file format. The extension parameter is a file extension string — you don’t write the “.”, for example “flv”. The extension for the next 3 is the same. setAsDefaultApplication(extension:String):void associates the current application with a certain file format. removeAsDefaultApplication(extension:String):void removes the association between an AIR application and a file. getDefaultApplication(extension:String):String reports the path of the application associated with a certain file. Returns a string of the application path.
Came across yet another new Google service — Google Site. This service is roughly the equivalent of a special-interest group site or a personal homepage service, letting you share your articles, photos, videos, schedules, life plans and so on with a group of people who share your interests. It lets you create and edit web pages online as easily as editing a document. You could treat it as just another personal homepage service, but I think it’s better suited as a platform for a club to share and communicate. Take this guy’s, for example: http://sites.google.com/a/googleuniversity.org/ski-club/Home He set up a ski club homepage on GSITE.
The AIR application descriptor file is an XML file that sets the basic properties of an AIR application. When developing with FLEX, it lives at “project folder/src/main file name-app.xml”; when developing with Flash CS3 it is also generated automatically when you create an AIR project, and you can edit it visually through the menu Commands > AIR - Application and Installer Settings, or edit the XML document by hand. The application descriptor file contains the properties of the AIR application and affects the whole application — its name, version, copyright, and so on. In theory, the application descriptor file can use any file name. When we create an empty file with Flash CS3 and use the default settings, the descriptor file is automatically renamed application.xml and placed in a special directory of the AIR project.
These three days are a national mourning period. We mourn for our compatriots who lost their lives in the earthquake, and pray that they pull through this ordeal as soon as possible and rebuild the...
Online installation link Click to download Fanfou AIR Client 1.6 Download the latest AIR runtime Download the reference source code 6.26 UpdateMinimize to the system tray is now supported: clicking the minimize button no longer clutters the taskbar — the app minimizes to the system tray instead. Thanks for your support. Download links: Click to download Fanfou AIR Client 1.7 Download the latest AIR runtime
How do you communicate with a website that requires HTTP basic authentication when building AIR with Flex 3 or Flash CS3? Take 饭否http://fanfou.com/home — the username contains an @ sign, and if you go straight to http://“+loginName+”:”+loginPass+”@api.fanfou.com/statuses/update.xml, you get an ioErr. I asked about this on Blueidea once and I’m still waiting for a reply. I searched online too, but most of what I found talks about how to configure server-side authentication, not how a client logs in… Someone asked about the login approach in C# and Java, but no answer there either. The only usable information was for VB and JS — with Ajax it’s easy, since the XML open method takes user and password parameters. Last year I scanned through the Flex code line by line and found that URLRequest has a setLoginCredentials method. Add the line urlR.setLoginCredentials(loginName,loginPass); and it will send the user credentials. Now that the new version of AIR has been released, that method is deprecated again. Since I never had the time to update the Fanfou AIR client I wrote last year, I didn’t pay much attention to it. Today I went to the official site and dug into it. The replacement: