I'm using a smart graphic as a button. The stuent will click on the button to open a URL. I have the states already created.
My problem is that I want to show it as visited without the student having to move the mouse over the graphic. Is there a way to do that? Or should I be using a differnt object for this purpose?
Confusing question... maybe the termiology. I suppose you talk about a smart shape as a button? Not so important because the behavior of all the button type (6 at this moment) is exactly the same for states. The InBuilt states, which include the Visited state, appear in a specific situation. The Rollover appears when hovering over the button, the Down when pressing the button and the Vistied state AFTER having pressed the button.
What do you mean by 'I want to show it as visited without the student having to move the mouse over the" graphic"? When hovering it is the Rollover state which appears. When you have clicked the button the Visited state appears, replacing the Normal state. You can force the Visited state by an action triggered by another event. You can preserve the Visited state when returning to the slide by checking the option 'Retain state'.
I went back to my original post and added the file that contains the slide that I'm referring to. Hope it makes it more clear.
You cannot attach a file, sorry.
You can insert screenshots or other images using the toolbar in the Browser version of the forum.
Just explain: why do you think that hovering is necessary to show the Visited state of an interactive object? It appears after you have clicked the button automatically. And you told that the button was clicked to show an URL. When do you want the Visited state to appear? I don't understand why a JS solution is suggested (can be done as easy with 'Change State' action) which is probably overkill since normally there is no action needed whatsoever to show the Visited state. That was necessary in older versions, but not in CP2019.
My first thought was to suggest simply having an onEnter action to change the state of the button but when I went to try it myself, it was greyed out and not an option.
It make no sense to show a Visited state for something that has not been visited. When you use the On Enter action to do so, the button has not even appeared. There is some misunderstanding here, which I tried to solve. InBuilt states are different from custom states. In older versions there was no InBuilt state 'Visited', but it is there since at least two versions now. Although contrary to the Rollover state, you can force a Visited state to replace the Normal state with any action. One restriction: you probably will need an advanced or shared action if you want to act on an object which is not on the same slide.
Thanks for all the info. I went back and previewed the project again, and now it works perfectly. Not sure why it wasn't showing it as visted before.
Thanks for all the great information.
You will need to change buttonName to match the name assigned to your button and change stateName to the name you have given to the state - such as Visited. These names are case sensitive.Keep the quotes.
For example, if my button is named webLinkbtn and my visited state was named Visited, I would write it this way...
It seems like there could be some other particulars here that need to be addressed but I will leave it at this for now.
Hopefully this was at least some food for thought.