Thx for the fast reply, Mark!
I'm gonna look into this postMessage-thing, but for now I seem to have solved the problem in another way.
The problem comes down to security issues and the need to have both HTML-files on the same domain. I thought that running the files from the same folder on my harddrive would qualify the security-restrictions, but it only works when I upload the files to a server.
My solution was to store my variable in an hidden input-element in the HTML-file containing the iframe. This way I can call the id of the input-element from inside my Hype-animation with myVar = parent.document.getElementById('inputID').value;
I'm sure there is a smarter way to do this (especially security-wise), but for this specific project this solution will do