Reference Home

Modified March 07 2017

Flash Components, AS2 (v2.10)

This page is out of date. See the latest version.

Parameters common to all components

The Correct Method
The name of an ActionScript function to call when the component is evaluated as correct.
The InCorrect Method
The name of an ActionScript function to call when the component is evaluated as incorrect.
The Reset Method
The name of an ActionScript function to call when the component is reset. This is occurs when the problem is loaded.

These optional parameters can be used in combination with custom ActionScript functions to modify the Flash movie at runtime (when the student is using the tutor). They work as simple event handlers so that you do not need to write an event listener for each component you wish to monitor—just specify the name of the function to run when the tutor evaluates the student's input.

CommShell

commShell

Required for tutoring. CommShell is the interface background that serves as the canvas on which you create your tutor interface. CommShell communicates with the Behavior Recorder for Flash to provide tutoring.

CommShell Parameters:

Behavior Recorder Mode
AuthorTime or RunTime. The data mode of the CommShell component. When set to RunTime, the status bar at the top of CommShell will be hidden, and the specified BRD file will be loaded. Set this parameter to RunTime when you are ready to deploy your tutor without the Behavior Recorder. When set to AuthorTime, CommShell will attempt to connect to the Behavior Recorder desktop application. Use AuthorTime when developing and testing the tutor locally.
BRD File Name
The relative path to the BRD (behavior recorder graph) used when testing the tutor in the Flash IDE. No BRD file extension is required. The path to the BRD file is relative to the HTML file when running the tutor in a browser. If you put the HTML, SWF, and BRD files in the same directory, the tutor will operate the same in the Flash IDE as in a browser.
Include Traces
true or false. When true, trace messages useful for debugging will be shown in the Flash output console.
Show Status Bar
Show or Hide. When set to Show, the status bar at the top of the CommShell will be shown; when set to Hide, it will be hidden. This parameter is ignored when the Behavior Recorder Mode is set to RunTime (the status bar will be hidden).
Socket Port
The socket port on which to connect. 1502, the default value, is the port which the Behavior Recorder uses.
Socket URL
The URL for the computer to connect to. The default, localhost, should be used when connecting to a Behavior Recorder running on the same machine as the Flash interface.
Tab Order
Down Columns or Across Rows. Specifies the direction of movement for shifting focus when pressing the TAB key.

CommButton

A general tutorable button widget. Available since: CTAT 2.2.

CommButton parameters:

Label
The text to appear on the face of the button.
Label Font Face
Font to use for the label text.
Label Font Size
The font size for the label text.
Show Hint Highlight
Sets whether or not the button is highlighted when the student requests a hint. Note that in some cases, highlighting the correct button will reveal the answer.
Treat Check as Done
When set to true, pressing this instance of CommButton also signals to the tutor that the student is done with the problem; no separate done button for the tutor is required.

CommCheckBox

CommCheckBox Parameters:

groupName
(String) This public property is currently unused in CTAT. Authors may use it in ActionScript to reference comboxes in relation to their group name
label
(String) Text of the label that appears next to the checkbox
labelPlacement
Left places the the label to the left of the checkbox; Right places the label to the right of the checkbox
selected
True sets the checkbox to its checked state; false sets it to its unchecked state
showHighlight
Default false. If true, show a yellow highlight on the component when displaying a hint for it. (By default, this parameter is set to false as highlighting the checkbox reveals the correct answer to the student.)

CommComboBox

CommComboBox Parameters:

labels
Values to appear in the combo box. We recommend that the first value be a dummy string such as "Select one of the following" or "--" to suggest that students actively engage with the component. Doing so also prevents students from submitting a value they did not actively select.
rowCount
The number of rows of values shown when the combobox is expanded. If there are more values than the number specified in this property, a scroll bar is shown.

CommDoneButton

A button widget for the student to signal that he or she is done with the problem.

CommDoneButton Parameters:

Button Purpose
Done - Finish the Tutor - acts a normal 'Done' button for the student to signal that they're done with the problem.
Intra-tutor Navigation - acts as a 'Next' button that progresses the student to the next phase of the tutor given that all components specified in Required Fields have been evaluated as correct. If some are incorrect or incomplete, a message is displayed. The next phase of the tutor is specified via The Correct Method parameter—this is an ActionScript method that is called when the done button is evaluated as correct.
Label
The text that appears on the button.
Required Fields
An array of component instance names that must all be evaluated as correct. This parameter is used in conjunction with the Button Purpose parameter value of Intra-Tutor Navigation.

A note about the correctness of the “done” action

Whether or not a student is actually done (ie, whether or not a done action is “correct”) is determined by a few problem-specific parameters: Suppress Student Feedback, enforceDone, and confirmDone. By default, a student is only done when the last action for them to complete is to press the done button. The following problem parameters can change this interpretation.

Suppress Student Feedback suppresses all evaluation information—red/green highlighting, hints, error feedback messages—from appearing. It is often used in evaluation (online testing) scenarios. By itself, it does not change the mechanics of determining whether or not a student is “done”. When Suppress Student Feedback is used, however, it may be useful to allow the student to move on to the next problem at any time. This can be accomplished by setting the enforceDone parameter to “false”.

When set to “false”, enforceDone makes it so that the tutor will no longer require that the student complete the graph (ie, traverse from the start state to a done state) to be done. When this option is set, you may want to prevent the student from moving on to the next problem by accident. To do so, set confirmDone to “true”; when the student presses the “Done” button, a message will pop up asking the student if they are really done working on the problem.

To set Suppress Student Feedback, check its item in the Graph menu of CTAT. To set enforceDone or confirmDone, you will need to manually edit the behavior graph file, adding an attribute to the graph's <stateGraph> element. Contact us for more information on how to do this.

CommListBox

Select CommListBox list items by double-clicking them.

CommListBox Parameters:

labels
The text values that populate the label values of the list. The default value is [] (an empty array). Use the Values window to add, remove, or reorder labels.
rowHeight
The height, in pixels, of each row in the list box.

CommMultipleSelection

CommMultipleSelection is a dynamic component—it is a component that is sized, configured, and generated at runtime. As with other dynamic components, it is well-suited for use with CTAT's mass production facility.

CommMultipleSelection input is represented in the form Checked for choice 1: Not checked for choice 2: Checked for choice 3: Not checked for choice 4. This input format lacks the actual label that appears next to the checkbox item. As a result, the hints for this component contain the same input format, lacking the checkbox item text.

As of CTAT 1.6.2, you should use this form when editing input in behavior graphs or specifying input in a mass production problems table.

CommMultipleSelection Parameters:

Answers Data
The text values used for text of the checkbox items. The default value is [] (an empty array). Use the Values window to add, remove, or reorder answer items.
Layout Orientation
The orientation of CommMultipleSelection, vertical or horizontal. When set to horizontal, the text for each answer item appears above the checkbox.
Number of Answers
The number of answer checkbox items.
Fit Shell to Component
True or false (default is true). When set to true, the CommShell component will automatically resize to match the dimensions of the CommMultipleSelection component
Font Face
The font face for the text of the answer items.
Font Size (Answer)
The font size for the text of the answer items.
Randomize Answers
True or false (default is true). When set to true, the order of the answer items will be set randomly.
Treat Check as Done
True or false (default is true). When set to true, pressing the 'Check' button also signifies to the tutor that the student is done with the problem; no separate done button for that tutor is required.

CommRadioButton

The CommRadioButton component allows the student to make a single choice from a set of choices. This component should be used in a group of at least two RadioButton instances; otherwise, once selected, the radio button can't be deselected. Only one member of the group can be selected at any given time. Selecting one radio button in a group deselects the currently selected radio button in the group. Set the groupName parameter to indicate which group a radio button belongs to.

CommRadioButton input is of the form instanceName: label, where instanceName is the instance name of the component on the stage, and label is the text that appears next to the radio button. This input form appears in the BRD file and, as a result, in mass production files. As of CTAT 1.6.2, you should use this form when editing input in behavior graphs or specifying input in a mass production problems table.

CommRadioButton Parameters:

groupName
Indicates which group a radio button belongs to. All radiobuttons in a group should use the same groupName.
label
The text to appear next to the radio button.
labelPlacement
Orients the label text on the button. This parameter can be one of four values: left, right, top, or bottom; the default value is right.

CommScore

A widget that displays the student's score for a repetition series. The score is incremented by one if the student completes the problem with no errors or hint requests. Available since: CTAT 2.2.

CommScore parameters:

Background Color
The color behind the ComScore text.
Font Face
Text font.
Font Size
Text size.
Label Prefix
Text to appear before the score (e.g., “Score =”).
Label Suffix
Text to appear after the score (e.g., “correct”).
showBorder
Whether or not to show the border surrounding CommScore.
Text Color
The color of the text in the CommScore.

CommSimpleAudioButton

As of CTAT version 1.6.2, CommSimpleAudioButton's Input is represented as either Audio Stopped. or Audio Playing. As with other CTAT Flash components, Selection is the instance name of the component. Action is SimpleAudioButton.

CommSimpleAudioButton Parameters:

AudioFileName
The file name, including the path, of the audio file to play. This path is relative to
Grade this Button
True or false. When set to true, pressing the button has two effects: while in Demonstrate Mode, the tutor records a state in the behavior graph; while in Example-Tracing Mode, the tutor evaluates student interaction with the button, marking it correct or incorrect. Interaction with the button is represented as one of two types: stopping the audio and starting the audio. Student evaluation, therefore, can be correct or incorrect based on whether the student is stopping the audio or starting it. (See note above this component's input.)
Label
The text to appear on the audio button.

CommTable

CommTable Parameters:

Font Face
The font to use for table text.
Font Size
The font size to use for table text.
Number of Columns
Number of table columns; can by any integer.
Number of Rows
Number of table rows; can by any integer.
Text Align
The alignment of text in cells; can be left, center, or right.

CommTextArea

CommTextArea Parameters:

Background Color
The background color of the text area, specified in hexidecimal notation (0xRRGGBB). RR, GG, and BB each consist of two hexadecimal digits that specify the offset of each color component. The 0x tells the ActionScript compiler that the number is a hexadecimal value.
border
show or hide. If show, the border of the text area will be shown.
editable
true or false. If true, the text area is editable (ie, the student can enter input into the text area).
Font Face
The font face to use for formatting text in the text area.
Font Size
The font size, in pixels.
html
True of false. If true, text in the text area will be treated as HTML code.
Return Key Action
Carriage Return or Grade the Widget. When set to Grade the Widget, pressing return sends the text in the text area to the tutor for evaluation—this makes it act similar to a text input.
Text Align
left,center, or right. The alignment of the text in the text area.
wordWrap
true or false. When set to false, the text area does not wrap words to the next line. The default is true.

CommTextInput

CommTextInput Parameters:

Background Color
The background color of the text input, specified in hexidecimal notation (0xRRGGBB). RR, GG, and BB each consist of two hexadecimal digits that specify the offset of each color component. The 0x tells the ActionScript compiler that the number is a hexadecimal value.
border
show or hide. If show, the border of the text input will be shown.
editable
true or false. If true, the text input is editable (ie, the student can enter input into the text input).
Font Face
The font face to use for formatting text in the text input.
Font Size
The font size, in pixels.
text
The text to show in the text input. This text appears at the start of tutoring, when the movie is first loaded; it can be overwritten by the tutor or the student (unless editable is set to false.
Text Align
left,center, or right. The alignment of the text in the text input.

CommTimer

A widget that displays elapsed time for a repetition series. CommTimer starts counting when the Flash movie begins loading. The elapsed time extends through the end of the repetition series. Available since: CTAT 2.2.

CommTimer parameters:

Background Color
The background color of the timer.
Font Face
The font to use for the timer text.
Font Size
The font size, in points, for the timer text.
Label Prefix
Text to appear before the timer (eg, “Elapsed time:”).
Label Suffix
Text to appear after the timer.
showBorder
Whether or not a border should be shown.
Text Color
The color of the timer text.

CommVideoAudio

Note: CommVideoAudio is initially only available to users of Flash MX 2004 Professional or Flash 8 Professional. To use CommVideoAudio in a non-professional version of Flash, open an existing Flash file that uses CommVideoAudio (you can use ours provided here); then copy CommVideoAudio from its library to the library of the file that doesn't have CommVideoAudio. You will then be able to use CommVideoAudio in your tutor.

CommVideoAudio Parameters:

Auto Play
true or false (default is false). When set to true, the movie will starting playing as soon as the Flash movie loads.
controlPlacement
Determines where the controls of the component are positioned relative to the component's display. Possible values are "top", "bottom", "left", and "right". The default value is "bottom".
fps
The number of frames per second for the video. Default value is 30 frames per second.
initCuePointNames
A list of 'cue point' names for the movie. Cue points are positions in the movie where playback will pause.
initCuePointTimes
A list of times, in seconds, for which playback will pause. These values must be in a valid HH:MM:SS:mmm (Milliseconds option selected) or HH:MM:SS:FF format.
Media FileName
The filename, including the path, of the media to play. For FLV (Flash Video) files, the path is relative to the SWF.
mediaType
The type of media to be played. Possible values are FLV and MP3.
Player Controls
Determines the visibility of playback controls on the component. Possible values are 'on', 'off', and 'auto'.
totalTime
The total length of the media, in seconds. This value will be displayed in the status area of the player controls. Since the FLV file format does not provide its play time to a media component until it is completely loaded, you must input Media.totalTime manually so that the playbar can accurately reflect the actual play time of the media. The default value for MP3 files is the play time of the media. For FLV files, the default value is undefined. You cannot set this property for MP3 files, because the information is contained in the Sound object. (Source: Macromedia LiveDocs)
Tutor Fields Final
A list of instance names of components to show when the media finishes playing.
Tutor Fields Initial
A list of instance names of components to show when the media playback reaches the first time specified in initCuePointTimes.

CTATPreloader

A widget that displays a Flash preloader while the student interface and start state of the problem are loading. Available since: CTAT 2.2.

To use CTATPreloader:

  1. In the Flash timeline, add a new layer above all other layers that have graphics.
  2. Add the CTATPreloader component to that new layer.
  3. Insert a frame (not a keyframe) in frame 2 of the preloader layer.
  4. Insert a keyframe in frame 2 of each layer that has graphics. This will duplicate the first frame's content on frame 2.
  5. Delete the graphic content from frame 1 of each layer.

Your resulting timeline should look something like the following:

CTATPreloader parameters:

Background Color
The color of the preloader background. Default is white.
Bar Height
The height, in pixels, of the loading box (the box surrounding the progress bar or thumb).
Bar Line BG Color
The color of the loading box's background—this is the area behind the progress bar or thumb. Default is white.
Bar Line Color
The color of the loading box outline.
Bar Width
The width, in pixels, of the loading box.
Content Frame
The frame to transition to when the Flash movie has finished loading.
Enable Preloader
Whether or not the preloader is enabled and will appear.
Font Face
The font face to use for the status text.
Font Size
The font size, in points, to use for the status text.
Max Preload Time
The maximum time, in milliseconds, to display the preloader. After this time, the movie will transition to the "Content Frame", regardless of whether everything has loaded.
Rendering Time
Time interval for which the preloader will wait beyond when it detects everything has loaded. For small tutors, use a small number like 1. For larger tutors, increase this value. The downside of too low a value is that the student may see the tutor in a partially assembled state.
Text Color
The color of the status text.
Thumb Color
The color of the progress bar or "thumb", a small bar in the loading box that indicates that the Flash tutor is loading but that the time remaining is unknown. This appears when the tutor is waiting for the behavior graph to load and process (in the case of RunTime mode) or is waiting for more information from the Tutoring Service (in the case of AuthorTimeTutoring mode).