7-day free trial to lynda.com video training library.

Advanced Page Tracking with Articulate

Justin | Instructional Design,tips | Tuesday, May 1st, 2012

At my job as a Creative Technology Manager at Pearson, I do a significant amount of work on interactive training with our Instructional Design team. Over the last 7 years, we’ve developed a highly-reusable, modular set of Flash templates that can handle all sorts of advanced interaction. As rapidly as the team can generate a course from the Flash templates, there are smaller projects where products like Captivate and Articulate are more appropriate. In the case of Articulate (Presenter), this is even more true when the client already has their materials in Powerpoint form, and would like to continue editing the Powerpoint assets. Articulate can export the Powerpoint slides as an interactive course (to run as a Flash/HTML-based module). Additionally, Articulate has SCORM tracking as an export feature for use with Learning Management Systems (LMS).

While we often produce LMS-based projects, we also frequently utilize other tracking modalities (to generate custom completion certificates, or when deployment to non-LMS sites is a client requirement, etc). The nifty thing we’ve discovered in these cases, is that we can publish an Articulate project for SCORM, and overwrite the JavaScript hook to serve our particular scenario.

To write your own custom hook: export your project with the LMS tracking turned on. Duplicate the player.html file that has been generated so that you can refer back to the unedited file. Open your duplicated file in a text editor.

Open a new script tag after the existing ones in the head tag:

<script language="JavaScript1.2">

Inside this <script> tag, you can now begin to override the default LMS configurations.

//Configuration Overrides
//set this to false if you don't want the overhead of recording debug information
var blnDebug = false;
//type of LMS to use
var strLMSStandard = "NONE";
//set this to true when debugging to force the debug window to launch immediately
var SHOW_DEBUG_ON_LAUNCH = false;
//set to empty function to prevent a js error from another file
LoadContent = function(){};

By setting strLMSStandard to NONE the JavaScript exported from Articulate will utilize functions from the lms/NONEFunctions.js file (instead of the files using SCORM or AICC functions).

Continuing inside the <script> tag you started, you can override any of the “NONE” functions (since you script comes after the embedding of the other scripts). The essential function is NONE_SetDataChunk, which is called each time a new screen (i.e. slide) is shown. This function receives a string that includes which pages have been visited, and which page is currently active. You can use this information to trigger you desired events (and make sure to close your <script> tag at the end).

//Override function in the NONEFunctions.js file
function NONE_SetDataChunk(strData){
   //example strData looks as follows:
   //viewed=1,2,3,4,5,6,7,8,9,10|lastviewedslide=10|
   var pageNum = strData.split('lastviewedslide=').pop().split('|').shift();
   pageNum = parseInt(pageNum) - 1;    //convert to array numbering
   //you can then use the pageNum value to trigger an outcome
   return true;
}
</script>

Not only have we used this generate custom certificates on non-LMS web servers, but we also combine this functionality with our comment tracking system. In the development and client review stages of a project, we use this code to trigger and update a button onscreen. When clicked, this button takes the visitor to our comment tracking system, opens and a new ticket, and pre-populates the field that identifies the current slide. That way we effectively solicit and apply feedback to each element of the project.

Quick Tip: Installing Adobe Extensions

Justin | extensions,tips | Wednesday, November 16th, 2011

If you have multiple versions of Adobe (or Macromedia) software installed, you probably have multiple versions of Extension Manager, the application that helps you install and manage extensions. This can lead to some confusion.

When you double-click an MXP (or ZXP) file, your operating system open your default version of Extension Manager. This may not be the version that you want, however. Suppose you have Flash Pro CS4 and Flash Pro CS5 installed. Your system will (probably) automatically launch Extension Manager CS5 when you attempt to install a new extension. This is okay if you want to install the extension in Flash CS5, but it will not be available in Flash CS4.

There are other issues that crop up when you have versions installed in multiple languages (and in some cases, if your language is not English). Luckily, there’s a simple way ensure that you’re using the correct version of Extension Manager.

  1. Launch the version of Flash Pro (or Dreamweaver, or Fireworks) in which you’d like to install the extension.
  2. Go to Help > Manage Extensions… and it will launch the matching installation of Extension Manager.

Features vs. Bandages

Justin | ActionScript,tips | Thursday, April 28th, 2011

At my part time job with Pearson, I’m a member of a team that maintains a large template system for e-learning projects. This template system allows us to produce very large media-rich courses in a relatively short span of time. In these projects, as well as others, I try to teach and maintain a system of adding features, rather than bandaging functionality that needs to change. When a client request comes in, I challenge myself and my colleagues to consider how this request could be made part of our permanent (and ongoing) system, rather jury rigging the current system to temporarily support new functionality. This feature-based approach has several long-term advantages that I will elaborate on this post.

(more…)

Adding Menu Items to Existing Menus with Adobe AIR

Justin | ActionScript,AIR,tips | Tuesday, April 5th, 2011

I’m working on a new desktop (Adobe AIR) application. More on that app in the months to come. In the process of putting together a prototype, I’ve found that NativeMenu.getItemByName doesn’t work (at least not on my system). I initially used the following code to try to add a menu item to the File menu:

var nm:NativeMenu = NativeApplication.nativeApplication.menu;
var nm0:NativeMenuItem = nm.getItemByName('File');
var mi:NativeMenuItem = new NativeMenuItem("Export...");
mi.addEventListener(Event.SELECT, exportSelected);
nm0.submenu.addItem(mi);

Unfortunately, the menu item resolves to null in the above code and subsequently generates an error. Instead, I’m using the following code (that works):

var nm:NativeMenu = NativeApplication.nativeApplication.menu;
var nm0:NativeMenuItem = getMenuItemByLabel(nm, 'File');
var mi:NativeMenuItem = new NativeMenuItem("Export...");
mi.addEventListener(Event.SELECT, exportSelected);
nm0.submenu.addItem(mi);

The getMenuItemByLabel function is as follows:

function getMenuItemByLabel(menu:NativeMenu, labelName:String):NativeMenuItem {
var count:uint = menu.items.length;
for(var i:uint=0; i < count; i++){
var item:NativeMenuItem = menu.getItemAt(i);
if(item.label === labelName) return item;
}
return null;
}

That way I can get the menu by name and rest assured that I’ve added to the File menu (or any other existing menu) without having to guess its index.

Article Round-up

Justin | articles,design,Flash,links,tips | Tuesday, October 19th, 2010

We’re keeping quite busy around here! Here’s a quick round-up of some recent articles that I’ve published.

5 Flash Animation tips in 5 days on the Peachpit blogs:

Also on the Peachpit site, there’s an excerpt on Character Animation from our recent book with Chris Georgenes.

I also have a new video tutorial over at ActiveTuts+ on Creating Advanced Motion Presets in Flash with JSFL.

In addition to the recent advice page I added on Learning Flash, I’m working on a page about becoming a graphic designer/Flash animator/digital artist. It includes some of my background and lessons learned. That article is pretty much on hold as we work toward the SmartMouth release (hopefully just another week), and I will pick it up after that.

Adobe Flash Learning Links

Justin | design,Flash,links,tips | Friday, August 20th, 2010

I’ve had a number of users contacting me regarding ways to learn Adobe Flash Professional. There are a lot of great resources available for users interested in animation, design, and development in Flash.  Whether you’re an advanced user, or totally new to Flash, there are tons of resources available. Over the years, I’ve read dozens of books and visited hundreds of sites. So, I decided to put together a single page with many of my favorite Flash learning links. Enjoy!

E4X ‘Gotcha’ With XML in Actionscript 3

Justin | ActionScript,tips | Wednesday, April 1st, 2009

Oftentimes, I like to trace pieces of data as I’m programming just to make sure everything is on track. When you’re trying to trace data using E4X (XML in Actionscript 3), don’t forget the toXMLString() function. In many cases, you won’t see anything if you forget to call this function. Your code will see the data just fine, but you might not think it’s working and spend time trying to diagnose a non-existent problem.

trace(xml.children()[0]) //empty trace
trace(xml.children()[0].toXMLString()) //now we see it!
Page 1 of 3123