Downloading and Installing PV3D Before Use

I got drawn in by PV3D and decided to give it a try from scratch. I’m recording the download and installation process here. A thought: there really isn’t much material on this out there. Install TortoiseSVN: Go to the page http://tortoisesvn.net/downloads Download the appropriate TortoiseSVN and install it (a reboot is required).

Flash

After Array.push(Object), only the last item is kept in the array

Yesterday a guy in the group ran into this: After I use Array.push(Object), why does the array end up holding only the contents of the last N item? For example: I want to push 1 Computer News official website—China’s computer enthusiast interactive portal, 2 virtual hosting, enterprise mail, server rental, 3 If you cannot access the website normally, please contact our company. But when I push the third one, the contents in the Array are: 3 If you cannot access the website normally, please contact our company, 3 If you cannot access the website normally, please contact our company, 3 If you cannot access the website normally, please contact our company. Solution: new an Object every time you push.

Flash

Tiandizhi! Tiandihui launches an original AS3 magazine

The inaugural issue of Tiandihui’s magazine Tiandizhi is out! Click to download the inaugural issue of Tiandizhi (2M) The book has a technical depth all its own and shares a lot of programming tips...

Flash

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....

Flash

Passing parameters to addEventListener event listeners

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); }

Flash

AIR File Operations (Part 3): Reading and Writing Files with the FileStream Object

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.

Flash

AIR File Operations (Part 2): Using File Objects to Manipulate Files and Directories

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

Flash

Don't! AIR network data cache

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:

Flash

AIR File Operations (Part 1): AIR File Basics

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

Flash

AIR's URL scheme

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

Flash
16789