ActionScript 3 Base Class Framework
Revision History
Current Release
23 February 2015
- Fixed a bug in the MultipleSelectPlayer class
where the resetEvaluatedValues method dispatched
a selection changed event even if no properties were removed.
Previous Releases
26 January 2015
- Added the MultipleSelectPlayer class for
supporting multiple-choice/multiple-answer questions. This
type is not directly supported by the CCT; see the whitepaper on
configuring a Command storyboard to support entering
multiple-choice/multiple-answer questions.
- Modified the PersistedPropertiesCollection
class to support decoding of UTF8 "byte encoded" Base64 strings (<encProp enctype="utf8"> XML elements).
- Modified the decodeToString method method of
the Base64 class to support decoding of UTF8 "byte
encoded" strings.
- Added the codePage property to the Base64
class.
- Fixed a problem in the resetResponse method of
the MultipleChoicePlayer class where the
status persisted property value was not updated.
- Minor documentation fixups.
11 November 2014
- Modified the GetNumber method in
TypeUtils to return the default value if null is passed or
if the cast to Number results in NaN.
29 July 2014
- Added isNullOrEmpty and formatString
methods to the StringUtils class.
- Modified the ShuffleArray method in TypeUtils
to support an optional flag that ensures the shuffled array always
returns an array with a differing order.
- Fixed a problem where SimulationPlayerErrorEvent objects
dispatched from the the SimulationPlayer had missing parameters
in some cases.
- Fixed a problem with the CommandSequencer where state data
was not completely restored in some cases.
- Fixed a problem where the AudioSequencer and TimeSequencer
players did not update their status property when a storyboard is unloaded.
- Fixed a problem where the sbType member of a Storyboard
object wasn't stored in the XML output returned from the toXML method.
- Minor documentation fixups.
8 November 2013
- Minor documentation fixups.
27 September 2013
- Added extendedDistractors property to the
MatchingPlayer class.
- Added totalQuestionDistractors and
totalAnswerDistractors properties to the
MatchingSummary class.
- Added many new styles to the TreeNode class.
Refer to the documentation for the complete list of styles.
- Added afterRedraw event (using the new
impression.events.TreeNodeDrawEvent) to the
TreeNode.
- Added a new style, nodeSpacing, to the
TreeView class.
- Added the lastAsset property to the
LoaderEx, SoundEx, and URLLoaderEx
classes, and modified the AssetResolver to support
the new property.
- Added RelativeLocations.DEFAULT_MAP and
RelativeLocations.CURRENT_MAP to the
RelativeLocations class. Note that the
isRelativeLocation()
method does not test for these values.
- Added support for an optional format to the newGuid()
method of the GUID class.
- Added the contains method to the
StringUtils class to support case-insensitive substring
identification.
- Changed the function signature of the
LessonMapCollection object's contains()
method to allow passing in a map name (string) as well as a
LessonMap object.
- Changed the internal composition of the TreeNode
object to improve support for adding objects to a TreeNode
instance.
- Changed the click and double-click handlers for TreeNode
objects in the TreeView to fix problems that can
occur with node selection when the tree nodes have selectable child
objects added by external code.
- Fixed a bug the LessonMap class where the
getLocationStatus() method erroneously returned
LocationStatusTypes.COMPLETE if the
non-null location passed was not contained in the map. Function now
returns
LocationStatusTypes.NOT_AVAILABLE.
- Fixed a bug in the CanvasPlayer where the sb
property of the LocationStatusRequestEvent object
dispatched by the Canvas was null.
- Changed the bubbles property of the
LocationStatusRequestEvent object dispatched by a
CanvasElement (and redispatched by the CanvasPlayer)
from true to false. This will be a
breaking change if your LocationStatusRequest event
handlers are listening to the renderingSurface or
to a DisplayObject hosting the rendering surface.
To fix this, listen for the event from the CanvasPlayer
itself. If your handler code listens to a DisplayObject
hosting the rendering surface, redispatch the event using the
hosting DisplayObject.
NOTE: Take care when redispatching, as the
handlers will change the status property of the cloned
event object, not the original. You will need to maintain a
reference to the cloned event object, then set the value of the
original event object when the cloned event returns. An example
of this is:
function onCanvasLocationStatusRequest(event:LocationStatusRequestEvent):void {
var clone:LocationStatusRequestEvent = LocationStatusRequestEvent(event.clone());
this.dispatchEvent(clone);
event.status = clone.status;
}
- Fixed a bug in the CanvasElement class where
the complete property (and the associated
ChildElement's "complete" persisted property) was not set
to true if the element's action property was
CanvasElementActionTypes.JUMP or
CanvasElementActionTypes.DISPLAY_RANGE and
the destination's status is
LocationStatusTypes.COMPLETE.
- Modified the MyShell sample runtime to always submit LMS
progress data when a storyboard is shown, even if the loading screen
is visible.
17 April 2013
- Modified the MyShell sample runtime to fix an issue where
student directions weren't updated properly when alternate
directions are provided for a Multiple-Choice question.
- Modified the MyShell sample runtime to not submit LMS progress
data until the loading screen has been cleared.
28 January 2013
- Fixed a bug in the .toString() method of the
LocationData class.
- Modified the MyShell sample runtime to support the new
PreviewLocation property that can be injected during preview.
13 December 2012
- Added support for the description element in the impression.persistence.properties.AssetData
class.
The constructor for the
AssetData class now takes three optional parameters;
the filename, description, and source file notes. The new
constructor takes the source file notes argument third—previously, this
was the second argument.
Ensure that any code that creates an AssetData
object and passes source file notes into the constructor is updated.
- Fixed a problem where the item() method of the
LessonMapCollection class would not return the
named map if the name was passed to the method and the map name is
not all lowercase.
- Fixed a problem where the isQuestionAtLocked()
method of the MatchingPlayer class did not work
properly.
- Minor documentation fixups.
14 August 2012
- Added impression.events.VideoFrameEvent class
and support for dispatching the event to the
impression.players.SWFVideoPlayer class.
- Changed the GUID generation algorithm in
impression.utilities.GUID to return RFC 4122 version 4
conformant GUIDs.
- Updated sample applications to use the latest BCF.
1 February 2012
- Added support for classification attribute to
impression.persistence.Lesson and
impression.persistence.Storyboard classes.
- Added impression.utilities.Classifier class.
- Updated sample applications to use the latest BCF.
27 May 2011
- Initial production release.
Changes from the 17 March 2011 (Beta) release:
- Created first release of documentation for objects in the
impression.players, impression.players.sequencers, impression.simulation, and impression.utilities namespaces.
- Breaking Change: Changed the constant value of
LessonMapControllerEvent.CHANGE. To
fix this, use the constant instead of the literal string.
- Breaking Change: In all players, the
resetStoryboard static method now removes known interim
completion criteria. To work around this, reconsider whether
or not you really need interim completion criteria saved after a
call to resetStoryboard. If you do, save the
properties using a different name before calling
resetStoryboard, then restore them after the call.
- Breaking Change: In all players, the
setStoryboardState static method now sets known interim
completion criteria if the state string indicates that the
storyboard is complete. To work around this, remove unwanted
interim completion criteria from the storyboard after the call to
setStoryboardState.
- Breaking Change: Removed the static
mergeStyles method from RenderingPlayer.
Use impression.utilities.mergeStyles instead.
- Breaking Change: Changed the
selectedQuestionIndex method of the MatchingPlayer
so that it returns 0 instead of -1 if no question has been selected.
- Breaking Change: Changed the type of the
changeData parameter in the evaluateChangeRequest
and onSimulationDataChanged methods of the
IRulesEngine interface from Object to * (untyped).
- Added the narrationComplete property to all
players.
- Added CanvasElementDisplayTypes and
CanvasElementShapeTypes enumeration classes.
- Added the useLastPosition property to the
CommandSequencer.
- The CommandSequencer now saves the value of the
position property to the storyboard as the
LastPosition persisted property.
- Changed the getMapFromLocation,
getMapFromCollection, getMapOfAncestors,
getMapOfDescendants, getMapOfChildren,
and getLinearMap methods of the
LessonMapController to return an empty map instead of
null if the map property is null.
- Changed the setCurrent method of the
LessonMapController so that an error is not thrown if an
XML object is passed and either the map or the
storyboards properties are null; instead, the current
item is set to null.
- Changed CanvasElement so that setting the
active property when the ActionType is
"jump" or "displayRange" only sets the Active
persisted property. It does not set the Complete
persisted property or force a redraw.
- Changed CanvasElement so that setting the
complete property when the ActionType is
"jump" or "displayRange" has no effect.
- Changed the dispatcher of the
CanvasElementEvent.INITIALIZE from the
Canvas to the CanvasElement. This means that you can listen
either the Canvas or the Canvas' rendering surface for initialize
events.
- Changed the loadStoryboard protected method in
the SimulationPlayer to add checks to ensure the
resolver is valid before calling resolver-related methods.
- Changed the name of the simulation parameter in the
loadSnapshot method of the ISnapshotLoader
interface.
- Changed the behavior of the AudioSequencer so
that the
StoryboardEvent.LOAD_COMPLETE event is not dispatchyed until
the audio file is loaded (if one is specified).
- Fixed a bug in the CanvasElement where the
destination status wasn't updated correctly if the ActionType
was "displayRange".
- Fixed a bug in the sbidOf method of the
LessonMapViewer so that the empty string ("") is
returned instead of null.
- Fixed a bug in the TypeUtils.getBoolean method
where numbers were not casted correctly.
- Fixed a bug in the LessonMapViewer class where
it was listening for a StoryboardEvent from the controller instead
of a LessonMapController event.
- Fixed a bug in the isResponseAtLocked method of
the MatchingPlayer that caused it to return
erroneous results.
- Fixed a bug in the setStoryboardState static
method of the SimulationPlayer where the
AdditionalActionsComplete property wasn't set to true
if the state string indicated a complete storyboard and the
completion criteria included "additionalActionsComplete;".
- Fixed a bug in the SimulationPlayer where the
events for the resolver weren't being listed for.
- Updated sample applications to use the latest BCF.
17 March 2011 (Beta)
- Created first release of documentation for objects in the
impression.events, impression.persistence,
impression.persistence.properties, and impression.resolver
namespaces.
- Updated sample simulation code. The sample simulation is
now called MagicBox, and has been completely
rewritten to minimize complexity and improve readability of the
code.
- Breaking Change: Changed the name property of the
PersistedPropertiesCollection object from
read-write to read-only. To work around this, create a new
PersistedPropertiesCollection object with the new name, then use the
copyFrom method to transfer the data from the
original.
- Breaking Change: Changed the function signature
of the length method in the LessonMap
class to be a read-only property instead of a function, and modified
the LessonMapController to access this method as a
property. To fix
this, ensure that calls to the routine use the property accessor
(that is, remove the trailing parenthesis).
- Breaking Change: Changed the string value of the
MultipleChoiceEvent.EVALUATE constant. To fix this,
use the constant instead of the literal string.
- Breaking Change: Removed the source property from
the SimulationObjectErrorEvent. The BCF never used this
property.
- Breaking Change: Changed the event dispatched
from a LessonMapController object when the current storyboard is
changed from a StoryboardEvent with a type
property value of StoryboardEvent.CHANGE to a
LessonMapControllerEvent with a type
property value of LessonMapControllerEvent.CHANGE.
Modified the LessonMapViewer class to listen for the new event. To fix
this, change any methods that listen for the StoryboardEvent.CHANGE
event to instead listen for the LessonMapControllerEvent.CHANGE
event.
- Breaking Change: Fixed a bug in the
CommandSequencer, AudioSequencer, and
TimeSequencer players that prevented the
complete property of each
ChildElement in the storyboard's children collection from
being removed if the alwaysCheckComplete property
was set to true. To fix this,
reconsider whether or not you really need
alwaysCheckComplete set to true—typically,
this is only needed for auto-advancing storyboards to
prevent "instant" advance when returning to a previously completed
storyboard. If you find you still need the alwaysCheckComplete
property set to true, but do not want the children's
complete persisted properties removed, you can either set the
alwaysCheckComplete property to false when the
StoryboardEvent.LOAD_START event is dispatched by the player, then
set it back to truewhen the
StoryboardEvent.LOAD_COMPLETE event is
dispatched; or you can create a different persisted property in each
ChildElement (something like
wasComplete), and set it to true
whenever you set the complete persisted property to true.
- Added fromObject class constructors and
toObject instance methods to all classes in the
impression.persistence.properties namespace.
- Added toString methods to all classes in the
impression.persistence and impression.persistence.properties
namespaces, as well as the TreeNode object in
impression.utilities.
- Added the contains function to the
ChildElementCollection class.
- Added getLocationStatus and
getMapFromLocation
functions to the LessonMapCollection.
- Changed how the filter method of the
LessonMapCollection class sets the default map of the
return value. See the documentation for details.
- Changed the function signature of the LessonMap
object's toXML function to return an XML object
instead of an Object.
- Changed all private member variables to
protected in all classes in the impression.events
namespace.
- Changed the scope of the static fromSource method of the
SimulationObjectTypes class in the impression.events namespace to
public.
- Changed the defaultTextFormat default style property of the
RTFPlayer from null to new TextFormat("Arial", 16).
- Changed the toXML method of the
PersistedPropertiesCollection to
encode string property values (and the source property of an
AssetData object) to prevent XML parsing errors. Before
creating the XML element for a String or AssetData object, the
method checks to see if a "less than" character (<) is present in
the string. If a less than character is present, the routine replaces
all occurances of the ampersand (&), less than
(<), and greater
than (>) characters with their HTML entity equivalents:
&, <, and
> respectively, before storing the
value in the XML element.
- Fixed a bug in the SimulationObjectErrorEvent handler in the
SimulationPlayer that caused the source property of the
SimulationPlayerErrorEvent dispatched by the player to be incorrect.
- Fixed a bug in the SimulationObjectErrorEvent where the
message property wasn't properly set.
- Modified the code in the ContentViewer class in the MyShell
sample to set the alwaysCheckComplete property of
the new storyboard's player to true if the
storyboard is marked as an auto-advance storyboard, and
false if it's not.
- Updated sample applications to use the latest BCF.
9 February 2011 (Beta)
- Added source file notes support to the AssetData
class.
- Changed the currentStep property set method in
the SWFVideoPlayer class to attempt to directly
gain a reference the step clip when changing steps. If the
attempt fails, the method then attempts to get a reference during
the next (few) onEnterFrame
events for the primary clip. This replaces the previous
behavior, which was to always defer to the
onEnterFrame event when
programatically changing the current step.
- Fixed a bug in the LessonMapController class where references to
the contained map's .length function was accessed as a property.
- Fixed a bug in the LessonMapViewer class where the SELECTED
LessonMapViewerEvent constant was incorrectly referenced as
LessonMapViewerEvent.SELECT.
- Added limited documentation.
- Updated sample applications to use the latest BCF.
4 November 2010 (Beta)
- Changed the name property of the
PersistedPropertiesCollection class to be read/write.
- Added optional clone parameter to the toObject
method of the
PersistedPropertiesCollection class.
- Added new splitFirst static method to the
StringUtils class.
- Added a new read-only property, relatedObject,
to the ResolverEvent class. When dispatching an event of
type ResolverEvent.BEGIN or
ResolverEvent.END, the property contains a
reference to the object that is loading the external asset; when
dispatching an event of type ResolverEvent.BEGIN_TRANSACTION or
ResolverEvent.END_TRANSACTION, the
property contains a reference to the owner (if any) of the object
loading the asset.
- Fixed a bug in MyShell's SimulationLoader class
that prevented storyboards from loading when both the simulation and
the simulationUI objects implement IAsyncLoad.
10 September 2010 (Beta)
- Fixed a bug in the clone method of the
LessonMapCollection class.
5 August 2010
Brought to You By
Mike Mustaine (impression@logicdriven.com) is the primary point of contact for the DevKit.
The DevKit includes contributions from the following people:
- Mike Mustaine
- Don Durie
- Ed Barlow
- Joe Paolini
- Greg Schroeder
- Adam Watson
- Eric Packwood
- John Knauf
- Teka Reynolds
- Lonetta Wilson
- Christa Santiago
Your questions and comments are encouraged. Help us make a better product by sharing your thoughts and
ideas with us.