科学四年级上教科版4.3跳动起来会怎样1

文档属性

名称 科学四年级上教科版4.3跳动起来会怎样1
格式 zip
文件大小 38.1MB
资源类型 教案
版本资源 教科版
科目 科学
更新时间 2012-09-22 11:38:41

文档简介

FileIO Xtra for Macromedia Authorware 7.0
Copyright 2003 Macromedia, Inc.
FileIO provides a set of functions allowing users of Macromedia Authorware 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.a7p) which demonstrates how to use the Xtra. It can be found in the Show Mes installed with Authorware.
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.
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 opened file. The file must be open to use this function.
displayOpen
CallObject(object, "displayOpen")
Displays a platform specific "open" dialog allowing a user to select a file. Returns a fully qualified path and fileName to Authorware. The setFilterMask function can be used to control what file types are displayed in the dialog.
displaySave
CallObject(object, "displaySave", "title", "defaultFileName")
Displays a platform specific "save" dialog allowing a user to specify a file. Returns a fully qualified path and fileName to Authorware. The setFilterMask function can be used to control what file types are displayed in the dialog. The title and defaultFileName parameters allow you to specify a default filename to be displayed, as well as title text for the save dialog.
error
CallObject(object, "error", status)
Returns a readable error string. A numeric error code is passed in as the third argument. (Also refer to the 'status' function.) The errors returned can be any of the following:
"OK"
"Memory allocation failure"
"File directory full"
"Volume full"
"Volume not found"
"I/O Error"
"Bad file name"
"File not open"
"Too many files open"
"File not found"
"No such drive"
"No disk in drive"
"Directory not found"
"Instance has an open file"
"File already exists"
"File is opened read-only"
"File is opened write-only"
"Unknown error"
fileName
CallObject(object, "fileName")
Returns the file name string of the current open file. The file must be open use this function.
getFinderInfo
CallObject(object, "getFinderInfo")
Returns the Type and Creator of the current file as a string. This function does nothing when used under Windows. The file must be open to use this function.
getLength
CallObject(object, "getLength")
Gets the length of the currently opened file. Returned as an integer. The file must be open to use this function. The value returned is the length of the file in bytes.
getOSDirectory
getOSDirectory()
A function that returns the full path to either the Windows directory, or the System Folder depending on which OS is currently being used. Does not require a child instance to call.
getPosition
CallObject(object, "getPosition")
Gets the file position of the current open file. Returned as an integer. The file must be open to use this function.
NewObject
NewObject("fileio")
This is called to create a new instance of FileIO. It returns an instance variable used to reference the instance.
openFile
CallObject(object, "openFile", "fileName", mode)
Opens the named file. This call must be used before any read/write operations can take place. The filename can be either a fully qualified path and filename, or a relative filename. The openMode parameter specifies whether to open the file in Read, Write or Read Write mode. Valid Flags are: 0 Read/Write, 1 Read, 2 Write.
readChar
CallObject(object, "readChar")
Reads the character (either single or double-byte) at the current position and then increments the position. The character is returned to Authorware as a string. The file must be open in read or read/write mode to use this function.
readFile
CallObject(object, "readFile")
Reads from the current position to the end of the file and returns the file to Authorware as a string. The file must be open in read or read/write mode to use this function.
readLine
CallObject(object, "readLine")
Reads from the current position up to and including the next Return, increments the position, and returns the string to Authorware. The file must be open in read or read/write mode to use this function.
readToken
CallObject(object, "readToken", "skip", "break")
Reads the next 'token' starting at the current position. Characters matching the 'skip' parameter are "skipped" and the file is read until 'break' is encountered. The file must be open in read or read/write mode to use this function. This function will read double-byte tokens as long as the skip and break are single-byte characters. It will not detect double-byte skip or break characters.
readWord
CallObject(object, "readWord")
Reads the next word starting at the current position. The file must be open in read or read/write mode to use this function.
setFilterMask
Sets the filter mask used by calls to displayOpen and displaySave. The filter mask determines what files to show when displaying an "open" or "save" dialog. The third parameter is a string representing the filter mask to set.
On Windows, this is a comma-separated string of file types and associated extensions (e.g. "All Files,*.*,Text Files,*.TXT"), and a string of types on the Macintosh (e.g. "TEXTPICT"). On Windows, the filter mask string is limited to 256 characters.
If a file type has more than one associated extension, separate the extensions with a semi-colon, rather than a comma (e.g. "All Available Sound,*.WAV;*.MP3;*.SWA;*.VOX").
On the Macintosh, you are limited to four four-character types.
When a new instance of FileIO is created, the filter masks defaults to all files. To reset the filter mask to display all files after it has been set, just pass in an empty string, e.g. CallObject(object, "setFilterMask", "").
setFinderInfo
CallObject(object, "setFinderInfo", "attributes")
Sets the Type and Creator of the current file. The string takes the form of a space-separated set of TYPE and CREATOR codes (e.g. "TEXT TTXT"). This function does nothing when used under Windows. The file must be open to use this function.
setPosition
CallObject(object, "setPosition", position)
Sets the file position of the current open file. The file must be open to use this function.
status
CallObject(object, "status")
Returns the error code returned by the last function called. The value is returned as an integer. (Also refer to the 'error' function.)
version
CallParentObject("fileio", "version")
Returns FileIO version and build information. Useful when filing bug reports, or determining installed version while authoring. No practical use beyond this.
writeChar
CallObject(object, "writeChar", "theChar")
Writes a single character to the file at the current position. The file must be open in write or read/write mode to use this function.
writeString
CallObject(object, "writeString", "theString")
Writes a string to the file at the current position. The file must be open in write or read/write mode to use this function.
===XtrAgent Trial Version 2.0
--------------------------
Developed by Tomer Berda, DirectXtras Inc.
Copyright 1998-99.
Last updated: 10 May 1999.
This is a trial version of XtrAgent. You can use it to see if it
provides you with the features you are looking for.
The trial version does not operate under projectors, packages
and Shockwave. In addition, the 'File' member/icon property
and the ability to create new XtrAgent members/icons on the fly
are not available in this trial version.
You have to license the Xtra to obtain the disabled features,
run-time capability, and the license to use and freely distribute
XtrAgent along with your applications.
Product Information
-------------------
XtrAgent is an Asset Xtra which enables the use of Microsoft's revolutionary
"Agent" technology in Director, Authorware and Shockwave applications, that
provides a foundation for more natural ways for people to communicate with
their computers.
XtrAgent adds a new type of member to your cast - Agent.
Agent is an interactive animated character that can be drawn on top
of all other sprites and windows and even outside of the stage area.
It can speak, via a text-to-speech engine or recorded audio, and accept
spoken voice commands.
Agents can be used as guides, coaches, entertainers, or other types of
assistants or specialists.
Using XtrAgent, developers can utilize Text-To-Speech & Speech Recognition
engines and freely distribute them with their applications!
In addition, XtrAgent provides powerful animation capability and interactivity,
with support for high-quality lip-synching at an incredible ease of development.
It comes with ready-to-use characters and also support custom characters that
developers can create using the Microsoft Agent character editor.
XtrAgent is available for Windows 9X & NT. It is possible to use it along with
the MacOS version of Xpress Xtra to have a cross-platform Text-To-Speech solution.
System requirements
-------------------
- Microsoft Windows 95, Windows 98, Windows NT 4.0 (x86) or later
- Internet Explorer version 3.02 or later
- Personal computer with a Pentium 100 MHz or higher processor
- At least 16 MB of memory
- Microsoft Agent core components 2.0 or later
- Hard-disk space for core components: 1 MB
- Text-To-Speech and Speech recognition engines (recommended)
- Windows compatible sound card (recommended)
- Compatible speakers and microphone (recommended)
- Microsoft Mouse or compatible pointing device (recommended)
- Hard-disk space for optional components:
Lernout & Hauspie TruVoice Text-to-Speech engine for speech output: 1.6 MB
Microsoft Speech Recognition Engine for speech input: 22 MB
Characters installed locally: 2-4 MB per character
Explanation of licensing-availability:
--------------------------------------
XtrAgent is a commercial product.
You can license it from http://www. for
$399 per developer, one-time licensing fee.
Along with the Xtra, you will receive full documentation, sample
codes and direct support by e-mail.
The licensed product includes a runtime version of the Xtra
that can be freely distributed along with your applications.
Auto-downloadable Shockwave safe version can be licensed seperately.
History
-------
May 10, 1999;
Version 2.0 released.
- The Xtra is now compatible with Authorware and Shockwave.
- Auto-downloadable Director Shockwave safe version is available.
- New Sprite functions: Think, Listen, Activate, ShowPopupMenu, GestureAt, Interrupt
- New Member/Icon properties: PopupMenu, TTSModeID, SRModeID, SRStatus
- New Member/Icon functions: ShowDefaultCharacterProperties
- New Events: VisibleState, ActivateInputState, Move, ActiveClientChange,
DefaultCharacterChange, ListeningState
- The new version requires Microsoft Agent core components 2.0 or later.
- Creating a new Member/Icon without specifying a filename loads the default
character (if available). If XtrAgent cannot find a linked character file using
Director/Authorware standard filename resolution algorithm, it searches the
Agent's characters directory for it.
See the File Member/Icon property for more info and changes.
- StopAll() can now stop only Show requests.
- SREngine Member/Icon property was removed. Use SRModeID instead.
- 'Suspended' Member/Icon property was removed. Microsoft Agent 2.0 or later
cannot be in a suspended mode anymore.
- Restart and ShutDown events were removed, Microsoft Agent 2.0 or later
cannot be shutdown or restarted anymore.
- Multiple cast Members/Icons for the same character are supported for Authoring
convenience purposes, though you still can't display the same character more
than once on the screen.
April 18, 1999;
Version 1.0.1 released.
- VisibleState event was added.
- Fixed crash that sometimes occured with Microsoft Agent 2.0 under Director 7,
when you quit the application with visible Agent character(s) that has some
uncompleted requests.
- Fixed some other minor issues related to Microsoft Agent 2.0 and Director 7.
June 1, 1998;
Version 1.0 released.
- XtrAgent built-in error messages replaced with error codes that can be handled
from lingo. See the sample movie for code that checks whether the character files
were loaded properly, if there is a compatible speech recognition engine
installed, and whether Microsoft Agent is installed and working properly.
- Speech output tags and animations for Genie, Robby and Merlin are now documented.
- New XtrAgent Member/Icon Properties: SREngine, SRHotKey
- New XtrAgent Sprite Event: Bookmark
- New XtrAgent Sprite Function : Stop
Bugs found & fixed:
- ExtraData property returned the Description property and was corrected.
May 18, 1998;
- Version 1.0 beta/preview released.
DirectXtras Inc.
P.O Box 423417 San Francisco, CA 94142-3417
Voice: +1-415-505-8249, Fax: +1-650-9384633
E-mail General information: info@
E-mail Technical Support: supp@
-----------------------------------------------------------------------------
Please send comments, suggestions and bug reports to :
supp@
Further information on Microsoft Agent technology can be found at
http://msdn./workshop/imedia/agent/default.asp and in
the XtrAgent HomePage located at http://www./
Xtra is a trademark of Macromedia, Inc.Disclaimer
----------
WHEREAS, DirectXtras Inc. has designed and developed proprietary software
included in this folder and known henceforth as the Program;
DirectXtras Inc. owns all right, title and interest in and to the Program.
By installing the Program, you agree that;
THE PROGRAM AND DOCUMENTATION IS PROVIDED
TO USER IN AN "AS IS" CONDITION. IT IS UNDERSTOOD BY YOU THAT
THE PROGRAM HAS NOT BEEN TESTED OR DEBUGGED AND THAT
DIRECTXTRAS INC. MAKES NO REPRESENTATIONS OR WARRANTIES REGARDING ITS
USE. YOU ACKNOWLEDGE THAT THE INSTALLATION OF THE
PROGRAM'S SOFTWARE INTO YOUR COMPUTER OR DISK MAY CAUSE VARIOUS
MALFUNCTIONS IN ITS SYSTEM. YOU HEREBY RELEASE DIRECTXTRAS INC. FROM ALL
RESPONSIBILITY FOR ANY DAMAGE CAUSED, DIRECTLY OR INDIRECTLY, BY
THE INSTALLATION OF SAID PROGRAM INTO YOUR, OR ANY OTHER COMPUTER.
DIRECTXTRAS INC. MAKES NO WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR THAT THE
USE OF THE PROGRAM OR ANY INFORMATION RELATING THERE TO
OR CONTAINED THERE IN WILL NOT INFRINGE ANY INTELLECTUAL PROPERTY
RIGHT OF ANY THIRD PERSON.
IN NO EVENT SHALL DIRECTXTRAS INC. BE LIABLE FOR SPECIAL OR
CONSEQUENTIAL DAMAGES ARISING FROM USE OF THIS PROGRAM.
YOU SHALL HAVE THE SOLE RESPONSIBILITY FOR ADEQUATE
PROTECTION AND BACK-UP OF YOUR DATA USED IN CONNECTION WITH THE
PROGRAM AND YOU SHALL NOT HAVE ANY CLAIM AGAINST
DIRECTXTRAS INC. FOR LOST DATA, RE-RUN TIME, INACCURATE INPUT, WORK
DELAYS OR LOST PROFITS RESULTING FROM THE USE OF THE
PROGRAM.
(C) DirectXtras Inc. 1999
www.directtransition3d破解版
毛毛的自由乐园
http://ntmaoyf.
2002.6