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.
===本资料来自于资源最齐全的21世纪教育网www.21cnjy.com
平行四边形的性质教学设计
教学目标:
一、教学知识点
1、掌握平行四边形有关概念。。
2、探索并掌握平行四边形的对边相等,对角相等的性质。
3、探索并掌握平行四边形的对角线互相平分的性质。
二、能力训练要求
1、动手操作实践的过程中,探索发现平行四边形的性质。
2、知道解决平行四边形问题的基本思想是化为三角形问题来解决,渗透转化思想。
3、通过探索平行四边形的性质,培养学生简单的推理能力和逻辑思维能力。
三、情感与价值观要求
1、探索平行四边形性质的过程中,感受几何图形中呈现的数学美。
2、在进行探索的活动过程中发展学生的探究意识和合作交流的习惯。
教学重点
探索平行四边形的性质。
教学难点
平行四边形性质的理解。
教学方法:探索归纳法
教具准备:多媒体课件
教学过程:
一、观赏生活中的图片,引入课题(电脑演示)
下面的图片中,大家找到了哪些四边形呢?
(设计这个活动,一方面可让学生认识到平行四边形在生活、生产中的应用,另一方面让学生在复杂的图形中认识平行四边形。)
二、开启智慧
1、操作活动:
用直尺裁两张纸条,把两块纸条斜拼在一起,并用透明胶固定。
2、观察、讨论:
(1)两张纸片重合的部分是什么的图形?它是四边形吗?
(2)这个图形中有哪些相等的角?有没有互相平行的线段?你是怎样得到的?
3、课件演示,得出平行四边形的定义
4、介绍平行四边形的书写方式及对角线的定义。
5、请学生举出自己身边存在的平行四边形的例子。
6、学生动手画一个平行四边形。
三、知识源于悟:
1、做一做(让学生实际动手操作)(出示幻灯片)
用一张半透明的纸复制你刚才画的平行四边形,并画出这两个平行四边形的对角线,标出对角线交点,在交点处将两个平行四边形钉在一起,将其中一个平行四边形旋转180度,看能得出那些相等的线段和角。
(教师点击课件,动画演示整个旋转变化过程)
2、讨论:(小组交流)
(1)通过以上活动,你能得到哪些结论?
(2)平行四边形ABCD对边、对角、对角线分别有什么关系?
3、结论: 平行四边形的对边相等
平行四边形的对角相等
4、你能用别的方法验证你的结论吗?(点击课件,演示证明过程。)
四、学以致用
1、点击课件,出示例1、例2。
2、学生思考、讨论,根据所学知识,解决问题。
3、教师验证,评价。
五、随堂练习(点击课件,出示练习)
六、新课小结:
通过本节课的学习,你有什么收获?
(同桌互讲,小组交流,师生共同小结)
七、作业设计:
1、观察周围的事物,列举生活中存在的平行四边形事例。
2、完成教材及同步训练中的相应练习。
八、课后反思
本节课,通过学生们自己动手操作,自己推导,自己发现从而得到平行四边形的有关知识,充分发挥学生们的探究意识和合作交流习惯。
21世纪教育网 -- 中国最大型、最专业的中小学教育资源门户网站。 版权所有@21世纪教育网(共4张PPT)
Authorware7.0、 Flash8.0、Gif文件编辑器、3 D MAX 9.0等。
技术运用
图片、音频、动画
素材运用
1、课件分别从导入、新授、练习、小结、作业等几个方面进行了设计。
2、注重学生的观察、思考,引导学生主动探索。
3、通过直观动画,演示复杂关系。
创作思路
周安金 黄永娟
作者姓名
平行四边形的性质
作品名称
作品创作说明
课件的特点
1、课件界面友好、版面布局合理,易操作。
2、课件的设计充分体现了交互性,进入每一个大标题均可以随意退出、返回、并可以选择性浏览上一页、下一页的内容。
3、课件动画演示较多,能充分展示教学内容,便于学生掌握。
4、可通过图标 控制声音的播放(按一下开始,再按一下停止)
产)本资料来自于资源最齐全的21世纪教育网www.21cnjy.com
课件使用说明
课件名称:平行四边形的性质
运行环境:
基本配置:586以上PC机,需要安装有声卡和SVGA显示卡
操作系统:Windows 98、Me、2000、XP、NT。
软件支持:源程序Authorware 7.0,已生成exe 可执行文件,可独立运行。
分辨率:800 x 600以上。
使用简介:
1、将课件光盘放入光驱内,打开光盘,找到平行四边形的性质.exe文件,双击后运行。
2、课件运行后点击相应的按钮即可进入相关的主题。
3、图标可控制声音的播放(按一下开始,再按一下停止)。
21世纪教育网 -- 中国最大型、最专业的中小学教育资源门户网站。 版权所有@21世纪教育网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.6XtrAgent 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.