Nezhul wrote:1) Flags can only be one letter in length? Or I can create more lengthy flags?
2) Flag values are saved if I close the tease and reopen it? Or is it runtime feature only?
I don't use flags anymore since GuideMe introduced javascript and real variables. So not sure if my answers are correct here. But flags should be able to be more than one letter. The current flags should also be saved if you close the tease and reopen it. But again: javascript variables are way more flexible.
Nezhul wrote:3) are there any visual editors for GuideMe?
Sadly, there is no visual editor für GuideMe! You could try any XML Editor but personally I use Notepad++
Nezhul wrote:4) Can you change page text without stopping the video that plays at that moment?
You have to "reload" the page to change the text, so it would also reload the video. But there are some tricks possible. Videos have a start-at and stop-at parameter. So you could load the same video but with different start-at and stop-at values and for the user it would look as if only the text changed.
Nezhul wrote:4) Where do you declare variables? I expect that they are declared somwhere?
Javascript variables? You declare them in functions as normal javascript variable. But they will be only available in that function. If you wanna "save" a variable to use it in another function use scriptVars.put(Name, Value). With scriptVars.put you save the variable in the state file of the tease. You then can load the variable anywhere else in your script with scriptVars.get(Name) and assign it to a javascript variable. Be aware: scriptVars.put and scriptVars.get are specific GuideMe functions and not "normal" javascript functions.
Nezhul wrote:Code: Select all
var vClickCount = parseInt(scriptVars.get("vClickCount"));
Or how does this line work? Is it referencing itself and I should assume that upon creation the default value was 0? I'm new to js, so sorry if that's a stupid question...

Good website to learn javascript is
here. Your code sample does the following:
1. Creates a new javascript variable called vClickCount (var vClickCount)
2. Loads the value of a variable with the same name from the state file (scriptVars.get...)
3. Assigns the value from the state file to your javascript variable (=)
Nezhul wrote:Or is it maybe created by
Code: Select all
scriptVars.put("vClickCount", "0");
and you don't need any declaration before it?
scriptVars.put just saves variable in the state file. In this case there are no javascript variables involved (the value is "0" and not a javascript variable). If you wanna use vClickCount as javascript variable you have to load it now from the state file and assign its value to a javascript variable. See your previous example how to do that.
Nezhul wrote:p.s. you have a confusing bug in the tutorial. When you demonstrate random pages, the text is the same for all of them (they all say this is "page1". I even thought that it doesn't work properly.
yeah... quite possible. The tutorial was written for a very early GuideMe version and surely needs some updates and fixes.
Nezhul wrote:How can I make GuideMe to NOT save the page I closed the tease on and ALWAYS start at the "start" page? I still want all flags/variables to be saved though.

No idea... I think thats not possible at the moment.
Nezhul wrote:Update: OK I see the routine for getting the list of folders. Now I would like to get a list of files in a folder.

I only know how to get a random filename from a folder (comonFunctions.GetRandomFile) or how to check if a file exists in a folder (comonFunctions.fileExists). These are both specific GuideMe functions, because javascript normally can't do anything like this. I think philo would need to create a new comonFunction similar to comonFunctions.ListSubFolders.