Hi,
I’d like to use Twine and interactive fiction in education (Language Teaching).
We already use Hot Potatoes for language quizzes (Cloze Tests, Crosswords, etc.). There is an option to export these tests as htm-Files.
So I wondered if there was be any possibility to import that HTML-code into my twine stories.
If I just copy the code into twine it works but looks ugly.
If I use I need to package the twine-story together with the htm-files.
Is there any way to HTML-code directly into an iframe without loading an external file?
Or would you know any other way to load the “Hot Potatoes”-HTML-Files into twine?
I can provide a Hot Potatoes test file for anyone willing to help me out.
Based on this sample code I found, you could import it into Twine with a few tweaks.
Just copy the <style> section to your Stylesheet section (with a few additions to fix a few things), copy the contents of the <body> section to a passage (with a “nobr” tag), and then copy the <script> section to your JavaScript section (just add a “var ” in front of “Status = new Array();” and change “function StartUp(){” to “window.StartUp = function(){”.).
You’d also need to add the following to the end of the passage:
<<script>>
$(document).one(":passagerender", function (event) {
setTimeout(StartUp);
});
<</script>>
That will work for one Hot Potatoes page, though you may need to do some additional tweaking for multiple pages.
Alternately, just add something like this to a passage:
Wow man, you are awesome.
It is more complicated than I thought it would be (not exactly teacher-friendly but knowing it is feasible takes me one step further.
At least in my case limiting it to one Hot-Potatoe-page per passage isn’t a problem since I wouldn’t put in more anyway.
Thanks a lot… I will toy around with it a little more at least now.
(Not that this post is in the wrong place, as it’s Twine-specific, but the resource is available if you would like to discuss using IF resources in a classroom setting!)