Page 2 of 2

Re: Objects not showing post export

PostPosted: Fri May 16, 2014 6:42 pm
by Clifton
Of course, PowerPac functions do not actually work in "reader" mode. ToolBook is not able to execute JavaScript in its authoring environment. You must export your page to see the effect. I wonder if that is also a problem or misconception.

Re: Objects not showing post export

PostPosted: Fri May 16, 2014 8:18 pm
by Robert Stevenson
Ahhhhh ... and now I see ... this only works once exported. Sounds like I need to create a native version with the old script and a web version with the PowerPac. My concern now is that the student may be able to simply enter the correct answer over and over again ... I guess I'll find out. Thank you again for hanging in their with my learning process. Appreciated!

Re: Objects not showing post export

PostPosted: Sat May 17, 2014 6:27 am
by Clifton
Attached is a little tbk that demonstrates your scenario. I've included a little bit of AE code to prevent objects from appearing and disappearing during the wait time (like if a person answered the question multiple times). If you set the parameter preventMultiDelay = true, then pgTBObjSet() will cancel any waiting timers on the object specified. This function is one of more powerful functions in the PowerPac in that it can manipulate nearly every object and property and some that are not even available to the normal AE system. Permitting multi-delays allows for interesting effects, but it may not be a good feature for this particular scenario—so it can be turned off in the parameters.

Not sure exactly what you intend to do with preventing multiple student answers, but it should not be a problem.

Re: Objects not showing post export

PostPosted: Sat May 17, 2014 10:26 am
by Robert Stevenson
Sweet! Just curious if post export this has to be tested on a server? I get the Javascript alert that "Page p0 does not exist and could not be loaded" when I attempt to preview the export locally.

Re: Objects not showing post export

PostPosted: Sat May 17, 2014 3:09 pm
by Clifton
ToolBook v9.01 exports will NOT run from a local hard drive—hence the error regarding p0 not found. You must put the files on a web server. Best approach is to install XAMPP as a local server on your hard drive. It makes testing during development a lot easier. Once your start the XAMPP server, you just point your browser to http://[computer name or ip]/[folder location]/index.html