I am trying to hyperlink from objects and text using scripting ( window.location.href ) which works fine in itself. Each object has its own links which work OK, but there is a problem when I reveal and hide different text elements all in the same screen space. I want a number of messages to appear in the centre of the screen, each of which should also be clickable. At present only the ‘top’ text is clickable and it seems to still be ‘in the way’ even when visibility is 0 (I have inhibited clicking on each layer when in this state). I have tried setting z-index to bring layers forward, but may be calling this incorrectly as it does not seem to be working.
If anyone has a moment to take a look at this and advise I would be grateful. link text tst.hype.zip (21.4 KB)
You know how it is - you write something down and then find a solution! I think I have got there with the following syntax for z-index: hypeDocument.getElementById('elementId').parentNode.style.zIndex = 9999;
Note using element here with a mouse click action will enable you to change the z-index on whatever element you click. You can put in an id of an element instead if you wish.
I also get this error on the console when using my attempts to use ID instead of element TypeError: undefined is not an object (evaluating 'H[L[a.id]][c.HYP_r]')
================
Never mind: I fixed it using the hype file above, I should use hypeDocument.getElementById instead of hypeDocument.getSymbolInstanceById hypeDocument.getElementById(dynammicbuttonClean).parentNode.style.zIndex = zON;
This is a specific error referring to the fact that "this" and also "get symbol instance by id" does not return an element the latter returns an "instance" so it cannot be used in the context of getting/setting an elements property.
As of the latest version (I do find it amusing when a 4 year old post gets brought back ) you can use the API's symbolInstance.element() method to get the actual element of a symbol instance.