... | .. | The EnterPageThe ToolBook Developer's Newsletter Issue 5-03 |
... | From Platte
Canyon Multimedia Software Corporation.
In This Issue
Introduction Introductionby Chris Bell What a fun time it is around here! Things are buzzing as we get ready for the ToolBook® and VBTrain.Net™ User’s Conference! The sessions are all set and we’re just finalizing the T-shirts and other attendee giveaways. When we’re not working on the conference, we’re enjoying the newest version of Instructor 8.5! We love its nifty new simulation object. Great job, Click2learn! This issue of The EnterPage has information about TBCON as well as a nice guest article by Peter Jackson (who will also be coming all the way from Australia to present at TBCON). You’ll also find all the normal columns with ToolBook tips and tricks that we hope you’ll find helpful. Enjoy the newsletter. Hope to see you in Colorado Springs in June! TBCON 2002: Last Chance to Register at Early Bird PriceAct now for early-bird rates at The ToolBook® and VBTrain.Net™ User’s Conference. Prices go up May 1. Conference rates are available at To register, please browse to TBCON 2002 Preview: Great Stuff for This YearThe 2002 Version of The ToolBook® and VBTrain.Net™ User’s Conference looks to be the strongest ever. Many of the world’s best ToolBook developers will be on hand to give presentations, offer one-on-one help at the help-desk, and more. This year’s addition of sessions on VBTrain.Net™ offers another dimension for developers to explore. As we have said other places: Simply put, ToolBook is the best CBT and WBT authoring package in the world (we think Visual Basic .NET is the new #2). Come to the conference to learn how Microsoft’s new .NET initiative can be used to create powerful Rich-Client or Web Based Training. For a list of sessions and descriptions, browse to: For a list of presenters, browse to: We will also have time for goofing off! On Monday evening, there will
be the traditional conference social featuring the amazing Dave Frisk on
guitar and good beer, wine, and soft drinks. While Monday is focused on
socializing and meeting the key ToolBook developers, Tuesday’s social will
have more of a talent-show theme. Participants in “The Hack-Ack,” a
fun-focused contest, will present their projects for audience judging. Not
only will the winners of the light-hearted Hack-Ack contest be announced,
but so will the winners of the more serious Click2learn ToolBook Design
Awards (see the article below on how to enter). Interspersed with these
presentations and awards will be Karaoke numbers by conference
participants. So, come ready to create great stuff for the Hack-Ack, and
get your singing voices ready as well! Click2learn ToolBook Design Awards at TBCON 2002Have you written a ToolBook application that you think ranks up there with the best of the best? You'll have a unique opportunity to showcase your ToolBook application AND enter to win a Handspring Visor Deluxe, courtesy of Click2learn! Click2learn applauds the imagination and ingenuity required to write a great ToolBook application, and wants to recognize those efforts. We'll be looking for the best original ToolBook application in each of the following categories: Best ToolBook Online Training Most Creative Use of ToolBook How to Enter Please complete a separate form for each application you are entering in the contest. Bring It With You or Send It In Applications will be reviewed by Click2learn's ToolBook Development
team onsite at the conference. Only applications created with either ToolBook Instructor or ToolBook Assistant will be considered. Please enter content which you can release for reuse on the Click2learn web site or in other Click2learn marketing efforts. Please get approval from your employer/customer before submitting your entry. If you need to prepare a specially edited version of the application for public consumption, you may do so. See http://www.tbcon.com/awards.aspx for the complete rules and restrictions. Questions? New Dates Available for ToolBook Training ClassesPlatte Canyon’s courses are consistently rated as “one of the best”
software training classes students have taken. Check out the newly
expanded schedule at Platte Canyon’s dedicated training site: The Hitchhacker's Guide to TB-DHTMLby Peter Jackson DON'T PANIC! When building ToolBook applications that are deployed via the web we may need to incorporate JavaScript to build additional functions. After a few hundred times of inserting the JavaScript reference into the index.html file, I decided to build a tool that would do it for me. Knowing that fellow ToolBook users might find this tool helpful I have made it available as a Developer's Exchange Tool. Information on accessing the tool is at the end of this article. We often need to pass ToolBook data to our JavaScript and back again.
During the export process our ToolBook variable names are obfuscated and
become $d, $e, $f, etc. An easy way to find which ${alpha} is our
original ToolBook global variable is to assign a known initial value,
say the variable name, like POST_URL = "POST_URL". After we export we
can open the global.js and look for the string POST_URL and we may see: Now we know that the JavaScript variable name is $g. Using this information we now need to change our JavaScript source to use $g - simple? This method has a number of flaws, the main one being that there is no guarantee that the name will always be $g as this can change as you develop your application and add/delete global variables. This means that you need to check that the name is still $g after each export and if it is not still $g then you must change your JavaScript so that it is referencing the correct variable name. Another flaw is that you may have a suite of applications like lessons in a course and you want to have a single JavaScript file, something like a ToolBook system book. In this case then there is no way to ensure that $g will be the same for each application, which means that you need multiple JavaScript files. - Yuk. So we need a fool-proof non-hack method to be able to safely determine the obfuscated variable name and what do we do if we want multiple variables. Enter the Action system global array variable! Whilst global arrays are also obfuscated the actual element names are not, so if we have a global array called TB_JavaScript[] in ToolBook it may be $e[] in the global.js file. However, when we assign a value like: TB_JavaScript["POST_URL"] = "POST_URL" We then see: in our global.js file.$e["POST_URL"] = "POST_URL" Using an array will allow us to have multiple variables (elements) with only one unknown reference. So, how do we find this unknown reference? We know that the variable will be ${alpha} starting from d. Therefore, all we need to do is check if $d["POST_URL"] = "POST_URL", then $e… The following JavaScript code can be used to find the unknown variable name. Note that I use the ToolBook global array TB_JavaScript[] and assign an element and value using this same name, as follows: _JavaScript["TB_JavaScript"] = "TB_JavaScript" Looks a bit funny, but it works /* This function will find the global array TB_JavaScript[] In TB we MUST assign an element of this array as follows: TB_JavaScript["TB_JavaScript"] = "TB_JavaScript" */ var TB_JavaScript = ''; function findTB_JavaScript(){ var varName = ''; for(i=100;i<120;i++){ var varName = '$' + String.fromCharCode(i) if(eval(varName)['TB_JavaScript']=='TB_JavaScript'){ TB_JavaScript=varName; break; } } } Note how we assign the unknown variable name to a JavaScript global variable called TB_JavaScript. So assuming that we find: $e["TB_JavaScript"] = "TB_JavaScript" Then TB_JavaScript will contain $e as a string. For example "$e" We can now use the JavaScript function eval() to extract/insert data. The next 2 functions provide a simple way to do just that. // This function will set the TB_JavaScript array to the new value // Syntax: getTB_JavaScript("POST_URL",POST_URL); function setTB_JavaScript(ElementName, newValue){ eval(TB_JavaScript)[ElementName] = newValue; } // This function will get the value from TB_JavaScript array // Syntax: var POST_URL = getTB_JavaScript("POST_URL"); function getTB_JavaScript(ElementName){ return eval(TB_JavaScript)[ElementName]; } Using these two functions we now have access to our ToolBook variables in both ToolBook and in our JavaScript. Putting It All Together We only need to call the findTB_JavaScript() once, so we need a simple system to do this. The following Actions and subsequent JavaScript functions will show how to implement this method: Actions Button "Submit" Action On click If TB_JavaScript["POST_URL"] = "" Display URL: javascript:getPostURL() End if Set HTTP Post parameter "SessionID" to TB_JavaScript["SessionID"] Set HTTP Post parameter "CourseID" to TB_JavaScript["CourseID"] Set HTTP Post parameter "Score" to TB_JavaScript["Score"] HTTP Post to: TB_JavaScript["POST_URL"]; store return value in PostError If PostError <> "" Comment: Handle error returned from the ASP End if JavaScript Functions // This function will get the HTTP Post URL and load the // value into TB_JavaScript array function getPostURL(){ if (TB_JavaScript=="") findTB_JavaScript(); var ServerPath = document.URL.substring(0,document.URL.indexOf('index.html')); var POST_URL = getParentURL(ServerPath,2) + "TB_POST.asp"; setTB_JavaScript("POST_URL",POST_URL); } Please note that if you do not "Obfuscate JavaScript exported from Actions Editor" in version 8.5, the above will not work as the variable names change from ${alpha} to the original names with a prefix of _AXF_{original name}. So we would see: _AXF_TB_JavaScript["POST_URL"] = "POST_URL" when we are looking for: $e["POST_URL"] = "POST_URL" in our global.js file. Tool to Add a JavaScript reference to your exported index.html file You can access the tool from either the Platte Canyon Website at: The Mistake I Made With Instructor 8.5’s Simulation Objectby Chris Bell The minute I got Instructor 8.5 in the mail, I ripped open the package and immediately installed it. (To be honest, after ripping open the package, I first thumbed through the included Platte Canyon catalog and THEN installed the software). After installing, the first thing I did was try out the much talked-about Simulation Object. This little object opens up a whole new way of creating software simulations in ToolBook. AND, these simulations may be exported to the web. I dragged on a field and a push button from the catalog and was ready to set up a teeny simulation. I named my objects, set the activated property of the field so users can type in it and opened up the simulation object’s extended properties editor. I added a step under the steps tab. I navigated to the Evaluated Objects and clicked Add. To my surprise, I couldn’t see my button in the list of possible evaluated objects. I saw my text field, but not my button. Hmm, why not? I deleted the button and created a new one. Same problem. I changed the border style to checkbox and it suddenly appeared in the list. Then I changed it back to pushbutton and it wasn’t there. After thorough testing, I decided that there was a bug in this brand new simulation object. (It certainly couldn’t be anything *I* was doing!) I fired off a message to one of the Click2learn team, gently breaking the bad news that they had a bug. Quickly I got a message back explaining, ever so gently, that it was actually my THINKING that had a bug. Pushbuttons cannot be evaluated objects because they have only one state (ready to be pushed). Check boxes and radio buttons may be evaluated because they have multiple states. Fields may be evaluated because a user may type in them. What I was really trying to do was make the button be a trigger. That was my mistake. The minute I came to understand the difference between trigger objects and evaluated objects, the whole Simulation Object came clear. Plug-In Pro Tool Spotlight: Edit Object ActionsAt Platte Canyon, we love ToolBook’s Actions Editor. It gives a large amount of programming capabilities that work inside of ToolBook AND when exported. But when it comes to creating complex interactions on a page, we found ourselves spending too much time clicking around to various objects and trying to get to the correct event. In typical Platte Canyon fashion, when we don’t like something, we create a tool to fix it (after all, we’re all about “Improving lives…”). We created the Edit Object Actions tool, a new feature of Plug-In Pro 6. When clicking the Edit Object Actions button in Plug-In Pro, you get a list of all objects on the page with actions. Click on the object name on the left and see a list of all handled events on the right. Double click on any of these and up pops the Actions Editor with that object and event already loaded. This handy feature has saved us tons of time while editing actions. A favorite among developers is the ability to quickly see a list of all handled events for an object. More information on Plug-In Pro is available at: Prices: CBT Creation Tip from Chris Bell: Björk’s New ToyBefore she became talk of the town last year wearing a swan dress to the 2001 Oscars, Björk was a singer. Her vocal performance with the Icelandic pop group Sugarcubes and later her solo career has established her as a superstar among the electronic dance music crowd … even if her singing cannot usually be described as melodic. How does Björk’s singing career relate to creating e-Learning? Well I did say she does “electronic” dance music. In a recent interview in Wired magazine, Björk mentioned that her favorite new toy is a MOTU 828. She likes it because, “it’s a firewire rack that replaces the soundcard, which means I can plug my microphone straight into my laptop, and it’s got the best recording quality there is.” Whoa! And I thought she could only make a splash in music, movies, or TV. Now she’s hit the big-time with the e-Learning crowd as well! The MOTU 828 sounds like a great device for those of us doing voice-overs. No more recording onto an intermediate machine like DAT decks or digital camcorders first and then transferring the files to the computer. We can record high quality sound straight into the computer! MOTU 828 avoids all the noise of computer innards (such as fans) and gives us pristine sound without needing to go to any other medium first. More information on MOTU 828 is available at http://www.motu.com. Another exciting related device is the Sound Blaster Extigy. This external sound card looks to offer some connectivity (albeit through the lowly USB port rather than the glitzy firewire port). One key difference here is that while the Extigy looks to have a Mic Input, the MOTU 828 is set up for professional studio mics and other inputs requiring balanced or unbalanced inputs and possibly needing phantom microphone power. It is yet to be seen if the Extigy’s inputs can be noise-free as the MOTU 828 allows. Price wise, the Extigy comes in at a reasonable $150 while the MOTU 828 sells for $795. With such a difference in price, the Extigy may be worth considering before jumping to the MOTU 828. Either way, with this new crop of recording options, the old methods of recording to an intermediate medium seem to be singing their swan song.
Expert Information from "Learning & Mastering ToolBook Instructor"from Jeff Rhodes Question Object Tips Although the question objects are fairly robust and self-explanatory, here are a few tips that might be helpful.
to handle ASYM_WID_Chosen obj, mode if mode -- edit script below for different behavior bnds = bounds of obj if _lineRef of obj <> NULL select _lineRef of obj else draw angledline from 0,0 to 0,0 end x = item 1 of syspageunitsperpixel * 3 y = item 2 of syspageunitsperpixel * 3 pop bnds into x1; pop bnds into y1; pop bnds into x2; pop bnds into y2 vertices of selection = x1-x,y1-y,x2+x,y1-y,x2+x,y2+y,x1-x,y2+y,x1-x,y1-y linestyle of selection = dotted strokecolor of selection = green fillcolor of selection = blue _lineRef of obj = selection else if _lineRef of obj <> NULL select _lineRef of obj if selection <> NULL send clear end clear _lineRef of obj end end end
OpenScript Tip from Jeff RhodesWorking with Rich Text Format (RTF) Files Although the Find Object tool is a welcome addition to Instructor, sometimes it is more efficient to find AND change an object at the same time. In this case, the getObjectList() function is usually the "weapon" of choice. The code below (to be run in the Command Window) searches the entire book for hotwords named "Librarian" (referring to the now-defunct Click2learn Librarian product). It then changes both the name and text of the hotword to be the name of the replacement product, Ingenium. I’ll be needing to use this function again in the next “Learning and Mastering” version to replace “Ingenium” with “Aspen.” numChanged = 0 step num from 1 to pageCount of this book pageID = page num hotList = getObjectList(pageID, "hotword", FALSE) while hotList <> null pop hotList hotText = text of it if name of it = "Librarian" name of it = "Ingenium" text of it = "Ingenium" increment numChanged end if end while end step request numChanged Back to Top
Actions Editor Tip by Cindy KesslerCreating Navigation Paths [Note: an example of this application is available at: This example shows how to use the Actions Editor to provide two different navigation paths through training. The first page the user sees has two buttons: "Beginner" and "Advanced." The user can select either "path." There are two hidden fields on the page, each corresponding to one of the path buttons. Each field holds a comma-delimited list of numbers corresponding to the pages for that path. (The pages in this training are named "training 1," "training 2," etc., and the fields contain lists such as 1,2,4,5 etc.) Both "path" buttons have one action sequence: ---------------------------------------- -- On click... -- Execute Shared Actions "BuildNavPath" Execute Shared Actions "GoBackOrNext" ---------------------------------------- When one of the buttons is clicked, "BuildNavPath" is called with the text of the field corresponding to the button as the pathPageNums parameter. The "BuildNavPath" shared action then parses the list into a global "navPath" array and sets the global "numPages" variable: ---------------------------------------- -- Shared Actions "BuildNavPath" -- Set pathList to pathPageNums Set numPages to 0 Loop while pathList <> "" Set numPages to numPages + 1 Set commaOffset to offset(",",pathList) If commaOffset > 0 Set pageNum to characters 1 to (commaOffset - 1) of pathList Set pathList to characters (commaOffset + 1) to charCount(pathList) of pathList Else Set pageNum to pathList Set pathList to "" End if Set navPath[numPages] to pageNum End conditional loop ---------------------------------------- After calling "BuildNavPath," the next action in the button's "On Click" event is a call to "GoBackOrNext" with a value of "Next" as the "direction" parameter. The "GoBackOrNext" shared action determines the navPath array index by incrementing or decrementing a global "pageIndex" variable. It stores the navPath array value in "num" and calls the shared action "GoToPageNum" with "num" as the parameter. ---------------------------------------- -- Shared Actions "GoBackOrNext" -- If direction = "Next" Set pageIndex to pageIndex + 1 Set num to navPath[pageIndex] Else Set pageIndex to pageIndex - 1 Set num to navPath[pageIndex] End if Execute Shared Actions "GoToPageNum" ---------------------------------------- The shared action "GoToPageNum" simply goes to the appropriate page based on the num parameter: ---------------------------------------- -- Shared Actions "GoToPageNum" -- If num = 1 Go to page "training 1" Else if num = 2 Go to page "training 2" Else if num = 3 Go to page "training 3" Else if num = 4 Go to page "training 4" Else Go to page "training 5" End if ---------------------------------------------- The background for the training pages has "Back" and "Next" buttons. Each button calls the "GoBackOrNext" shared action shown above, passing in its own name as the "direction" parameter: ---------------------------------------------- -- On click... -- Execute Shared Actions "GoBackOrNext" ---------------------------------------------- The "Back" and "Next" buttons are enabled or disabled in the "load page" event of the background: ---------------------------------------------- -- On load page... -- Set enabled of Button "Back" to pageIndex > 1 Set enabled of Button "Next" to pageIndex < numPages ---------------------------------------------- The background also has a "New Path" button that hyperlinks to page 1. This allows the user to select a different path. The only thing left to do is make sure we reset the necessary global variables on page 1. This is done on "load page": ----------------------------------------------------------- -- On load page... -- Define local variable "resetArray" (Initial value: "") Set numPages to 0 Set pageIndex to 0 Set navPath to resetArray ----------------------------------------------------------- Note that resetArray is a local array that has no values. We set navPath to resetArray in order to clear and re-dimension navPath. That's it for our basic example. There are many variations on this theme, such as using page names as array indices and creating menus from the navPaths. Take it from here!
Coming in the Next Issue of the EnterPage
Information on Subscriptions and Article SubmissionsThe EnterPage is distributed 4 times a year, with occasional special issues. Individuals who have expressed interest in Platte Canyon Multimedia Software Corporation or its products receive The EnterPage. If you do not wish to receive future issues, send an email message to EP@plattecanyon.com with the word "unsubscribe" in the subject line. New subscriptions are available by sending an email message to EP@plattecanyon.com with the word "subscribe" in the subject line and the person's name and company in the text of the message. Suggestions for articles or proposals for article submissions are welcome. Send information to EP@plattecanyon.com. Back issues of the EnterPage are available at http://www.plattecanyon.com/enterpage.aspx. This page was created by Platte Canyon Multimedia Software Corporation. |
|
n | .. | Copyright © 2002 Platte Canyon Multimedia Software Corporation |