课件编号1083925

美术一年级下人美版9《可爱的动物 》 课件1

日期:2024-04-30 科目:美术 类型:小学课件 查看:26次 大小:84546723Byte 来源:二一课件通
预览图 0
美术,一年级,人美,可爱的动物 ,课件
    FileIO Xtra for Macromedia Authorware 6.0 Copyright 2001 Macromedia, Inc. FileIO provides a set of functions allowing users of Macromedia Authorware 6.0 to programmatically access files using scripting. Using FileIO ============ As an Xtra the FileIO Xtra must be in your application's Xtras folder. Each instance of FileIO can reference a single open file. If multiple files are to be opened simultaneously, a new instance of FileIO is required for each opened file. A single instance can be used to open multiple files, as long as the file is closed before a new file is opened. To create a new instance use NewObject, defined below. To dispose of an instance, set the instance variable to 0. All functions that read from or write to the file must be called after the file has been opened using openFile. If a new file is to be opened using the same instance, the old file must first be closed using closeFile. Files can be opened in three different modes: Read, Write and Read/Write. When writing to a file, the contents of the file after the current position are overwritten. Example Script: -- Create an instance of FileIO myFile := NewObject("fileio") -- Display an "open" dialog and return the file name to Authorware myFileName := CallObject(myFile, "displayOpen") -- Open the file CallObject(myFile, "openFile", myFileName, 1) -- Read the file and return a string to Authorware theFile := CallObject(myFile, "readFile") -- Close the file CallObject(myFile, "closeFile") -- Dispose of the instance myFile := 0 In this example, a new instance was created and stored in the variable myFile. Next, a call to displayOpen is used to display an open dialog to allow a file to be selected. The file name is returned as a fully qualified path string to Authorware. The file is then opened in read-only mode, the contents of the file are read, and the file is closed. Lastly, the instance is disposed. There is also an Authorware Show Me (xtraio.a6p) which demonstrates how to use the Xtra. It can be found in the Show Mes installed with Authorware 6. Known Problems ============== The FileIO Xtra cannot use a net-based file when supplied with a URL for the file name. It is limited to accessing files available via file systems mounted on the local system. The displaySave function does not directly inform Authorware whether a user is replacing an existing file. A workaround is to attempt to create the file using createFile and check the error code for a "File Already Exists" error. Function Reference ================== closeFile CallObject(object, "closeFile") Closes a file that has been previously opened using openFile. createFile CallObject(object, "createFile", "fileName") Creates a file. The fileName must be either a fileName to be created in the current directory, or a fully qualified path and fileName. Relative paths are not supported. After creating the new file, the file must be opened before it can be written to. delete CallObject(object, "delete") Deletes the currently opene ... ...

    ~~ 您好,已阅读到文档的结尾了 ~~