Mediator 9: Tracking a User’s Score

Mediator 9

This episode builds on the previous screencast in this series, ‘Storing & Displaying User Input Data’. That episode introduced most of the key elements for programming user interactivity and I’ll not be introducing any new programming elements here; it is really just a matter of using those elements in a slightly different way. If you’ve not already watched that screencast then I recommend that you do so before watching this one. If you have already worked through that episode then you should find tracking a user’s score quite straightforward.

In this screencast I develop the project that I demonstrated in the ‘Drag & Drop’ episode. So you might also want to watch that screencast to refresh your memory of how it was set up.

If you’d like to explore the example Mediator document that is demonstrated in this screencast, you can download it and edit it on your own computer (assuming that you have installed Mediator 9).

Duration: 11min 4secs

Level: Intermediate

Download (click a link below):

QuickTime 960 × 600

QuickTime [small] 640 × 400

Download this screencast in iPod/iPhone format via iTunes


  1. Cory Smith

    Really glad I stumbled across this site. Thank you very much for all your video tutorials they are impressive and more importantly useful. Please continue to do them. Mediator 9 is an amazing piece of software that unfortunately seems not to have garnered the support it deserves. It is the only visual multimedia programing system that combines an easy to use object oriented programming interface with real power programming implemented in a way that non-programmers can implement.

    Really interested in how to do a non-square screen and trying to implement what I think of as mini-apps, where you can call a second Mediator from the current one. Want to develop a simple calculator as a sample project that runs like a separate little program, would like to make it a library object that could be easily pasted into another Mediator 9 document as a minimum, or preferably a stand-alone file that is simply ran from another Mediator9 document just to see if it can be done.

    Thanks for all the work.

  2. John Hanson

    I have just got Mediator 9 and have downloaded all of your screencasts to teach myself how to use the software: 1 Basics, 2 Using Sounds, 3 Formatting and Master Pages, 4 Hotspots, 5 Drag and Drop, 6 Storing and Displaying User Input Data, 7 Tracking a User’s Score

    Many thanks for them. Will you be doing anymore?

  3. Jeremy

    Hi John! Hope you find the screencasts helpful. I will be adding more and I have a big one on advanced drag and drop in production. A new arrival in the family has meant that this has been delayed. If you subscribe to the screencasts through iTunes any new ones can be automatically downloaded. Have fun with Mediator!

  4. Marco Teufel

    Hi Jeremy,

    currently i’m working on a mediator-project in my company. I’ve created a interactive presentation with a little game included on every page.
    I wonder if there’s a possibility to store the text from input objects not just by clicking an extra button (submit oder something like that), maybe create an event “one page leave” ?
    Because my probands are complaining about the fact that they have to click a store button to assign the text from input objects to a javascript:jQuery(‘#commentform’).submit();variable AND afterwards click the next-page button. For the navigationbuttons like next/previous/home/exit, i’m using a topMasterPage-template.
    So, a one-click-store-variable-and-go-to-next-page solution would solve the problem :)

    Hope you have an idea?

    BTW: Great tutorial videos. Keep up the good work!

    Thanks in advance.

  5. Jeremy

    Hi Marco. Thanks for your comment and sorry about the slow response. It is possible to do this by simply adding both the Assign action and the Go to Page action to a mouse click event on a single button. So long as the Assign action is placed before the Go to Page action it will execute before the user is taken to the next page. Let me know if this solves the problem or if I have misunderstood the question.

  6. Steffen Raco

    Hi Jeremy,

    first of all a big THANK YOU for your tutorials. Unfortunately the Mediator Community is not as big as it should be (especially in Germany), so it is quite hard to find good tutorials.

    Currently I am working on a Mediator-App where a kind of a “stop-watch” is necessary. I tried to figuere out how to create a fature that measures a time period between clicking “Start” and “Stop” based on your tutorials.

    Any ideas how to do this easily – perhaps I have missed a feature within mediator 9 that does the trick already.

    So far I have made the following steps:

    – created a variable “Start”
    – created a variable “Stop”

    how can I assigne a timestamp to these variables? It must be something with @time, right? In the end I just have to check the difference between A and B.

    Thanks ina advance

  7. Jeremy

    Thanks for your comment, Steffen. Instead of using the @Time system variable, you should use @Timer. I quote from the Mediator help files…

    @Timer (integer)

    Description: The number of seconds since Mediator was started

    Usage: Use this for instance to calculate the time spent on a specific task by saving the @Timer value at the start of the task and subtracting this initial value from the value of @Timer at the end of the task.

    That should solve your problem. Good luck!

  8. Elisabeth

    Hi Jeremy!
    It’s nice to see more people working with Mediator. I am actually using Mediator in my thesis to update an application.
    Are you familiar with using databases in Mediator? I am having some difficulties that the manual doesn’t explain, and I was hoping someone with more experience could answer this.
    Is it possible to store the return values from my SQL queries somewhere (perhaps in an array), or do I have to use the DB pointer? If not, can I use the DB pointer in a script instead of the (limited) DB pointer event?
    I hope you could answer this for me, it would mean alot! Matchware’s supporting response time leaves something to be desired.
    Best regards,

  9. Jeremy

    Hi Elisabeth!

    I’m afraid that I’ve never delved deep into the murky world of using databases with Mediator. I’ve been put off by the inadequate documentation and the fact that it seems far from intuitive. So, I’m sorry but I’m not able to help you out on this. If you do solve the problem then it would be great if you could post a comment explaining what you did.

    Anyone else out there able to help Elisabeth?

  10. Elisabeth

    Hi Jeremy!
    Thanks for the fast reply. Your blog is the closest thing to a support forum that I could find! It really is great to find a helping hand, in situations like this one. So thanks, anyway :)

    I do have a bad hunch about this problem. I just hope I find a neat enough way to solve it, for the sake of my thesis!

  11. Elisabeth

    I am upgrading this tool for speech and language pathologists, made in Mediator. It’s made for children that has different kinds of problems with their pronunciation. Right now everything is hard coded, so I’m meant to introduce some more advanced settings to it. I doubt that Mediator was build for these kind of tasks. What do you think about it?
    Anyway, I “solved” the problem with by using the drag’n’drop programming. It’s not pretty, it’s very repetetiv, but it works! Hope to hear from Matchware soon about a smoother solution!

  12. jakob

    Can you do a short tutorial on how to do an input object that allows the user to hit enter without it leaving the input object

  13. Jeremy

    Hi Jakob

    You’re not the first to raise this issue. Trouble is, I’m not sure it is actually possible to do what you describe in Mediator (even though it really should be). If anyone knows better and would like to enlighten me (and anyone else who might follow these comments) then please do. If I discover a way to do this, I’d be happy to post a tutorial explaining the process.

  14. Wendy

    I like your screencasts. They have helped a lot. Can you tell me how to create a group for labels to use in a hot spot presentation?

  15. Jeremy

    Hi Wendy. Thanks for your nice comment. Not sure I completely understand what it is you want to do. Could you give a little bit more detail?

  16. Hannah

    Hello! Thank you so much for all this help!

    I am creating a reward system for a class I teach and I want it to be a .swf file that I can use every week. The idea is that the class bank time every week to use at the end of term on whatever they wish. I was wondering if you know whether it is possible to give a class a score and save that score in the .swf file, so that the next lesson, it doesn’t lose the minutes the kids have banked?

    Thank you

    Hannah x

  17. Heather

    I am using Mediator 9 to create a simple drag and drop game. I am stuck on the feedback bit – I cant figure out how to set it up to give two pieces of feedback. I was thinking of providing a sound or even a graphic as a method of feedback to the gamer. Any help would be much appreciated.

  18. wil

    Hello Heather,
    Unfortunately Mediator will not allow you to save any information back to a swf, your probably best looking for a different way to develop your app, otherwise you might be able to code sort of xml feedback system using the visual basic side. As for your feedback question, are you asking how to implement it, or what to use? I currently use a large tick and cross to signal to the user when something is right or wrong. i get them to fade on or off the screen, i can show you an example if you want.

  19. Heather

    It would be great if you could show me your example. A tick and cross system would be ideal for what i want. Thank you Jeremy!

  20. Jeremy

    Hi Heather

    That last comment was from another reader (Wil), so I can’t claim the credit. I do plan to post a screencast on advanced drag & drop techniques for Mediator which you might find useful. It has been in production for a while but it’s been on hold due to other priorities. I’m hopeful that I’ll get it out by the end of August.

  21. wil

    I have two examples, the first one, implements an advanced drag and drop (it remembers were tiles are dropped, even if you replace them), but has the user feedback of a tick and cross

    and the second, uses a different technique to drag and drop but has the same user feedback of the tick and cross.

    I think you’ll need an tes account to view them, but once logged in you check out some of my other mediator projects. Ill be happy to help with any issues.

  22. Heather

    Would be very grateful if you could show your example of the tick and cross. Thank you

  23. MediatorUser

    Hi, im using mediator for my OCR Nationals and i am trying to put a global score system in. On Question if you click the correct answer then it assigns score+1 then on my spot the difference question find all five and score+1 again. Then on my result page i have event on page If Score=1 then it shows a personal message and changes input box to ‘value as expression’ Score. I have another If Score=2 then a different message, but only Score=1 seems to work. This is probably hard to understand but can anyone help?

  24. Jeremy

    I suggest you try running the document with Debug turned on. Take a close look at the values being set for the score variable. Is it updating correctly? If it is then your problem would be with that final IF… conditional. If it isn’t then you need to see where the problem occurs and recheck your programming.

    Hope this helps and good luck with your OCR Nationals.

  25. MediatorUser

    Hi again Jeremy, I was wondering if you knew if there was a way of making a .wmv auto start in full screen?

  26. MediatorUser

    Hi Jeremy, me again. Do you now how to make a specific event happen when pressing a button in a message box? ie. “OK” “Cancel” etc
    Thanks in advance

  27. shan123

    how do you add a pause button to a game, so that all the events stop, and then start again when you click on the button again?

    Also is it possible to have a highscore page that will have the playerrs name, and other previous players names, which they will be ranked. So it saves the names and score ?


    Hi Jeremy, I am doing a project in mediator. However I am stuck on programming my message box to exit the multimedia project. I just want to know how to make a specific event happen when pressing a either “Yes” or “No” in a message box?

    Thank you

  29. Jeremy

    Not in its original form. You’d have to maybe use video screen capture to turn your project into a video or something like that.

  30. Yasmin

    Hi Jeremy,

    I am currently working on a quiz, and I was wondering if it is possibly to create a time limit for each question page and how you do this. I have 3 input box pages, with IF statements for each as well as Assign to add a 1 point for each correct question. I have an answer button in case they do not know the answer, however is it possible to make them not get a point if they reveal the answer, and then type in the correct answer?

    Thank you very much,

  31. Katie

    Looked everywhere for an answer and cannot find one, so hoping you can help.

    How do you make a message box work? I’m trying to link a document to the box, so when you click ‘OK’ it takes you to it, and when ‘Cancel’ it takes you back to the previous page. At the moment, ‘OK’, ‘Cancel’ AND the exit button are all linking me to the document.

    Just can’t figure it out!


  32. wil


    ,I run a mediator support site, that was setup to answer questions l just like this! Why not have a look at it (website link above) and think about posting your query on that site. I have a few ideas of how you might go about solving this issue, which ill happily discuss.


  33. happy

    hi jeremy I from Indonesia, finally I found this blog, I have downloaded a few of your sample project that really helped me in learning mediators. I’m learning to create application kiosk, if you can help me make a sample project for the case where if there is no activity of the mouse for 5 seconds then a page will go to a specific page. I am not a programmer.