• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Show Smart graphic as visited without clicking

Explorer ,
Apr 09, 2020 Apr 09, 2020

Copy link to clipboard

Copied

HI Folks,

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?

 

Thanks,

Carl

Views

462

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 09, 2020 Apr 09, 2020

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'

...

Votes

Translate

Translate
Community Expert ,
Apr 09, 2020 Apr 09, 2020

Copy link to clipboard

Copied

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'.

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 09, 2020 Apr 09, 2020

Copy link to clipboard

Copied

HI Lily,

 

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 09, 2020 Apr 09, 2020

Copy link to clipboard

Copied

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. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Apr 09, 2020 Apr 09, 2020

Copy link to clipboard

Copied

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.

So I said to myself... "Hmmph... I will show you!" and I made it change with JavaScript.

 

Another non-JavaScript option would simply be to make the desired onEnter state your Normal state.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 09, 2020 Apr 09, 2020

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 09, 2020 Apr 09, 2020

Copy link to clipboard

Copied

Hi Lily,

 

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.

 

Idolproff

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 09, 2020 Apr 09, 2020

Copy link to clipboard

Copied

LATEST

OK? it was just a glitch in that case. More information about States in this blog post:

 

http://blog.lilybiri.com/about-state-commands-and-a-progress-bar

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Apr 09, 2020 Apr 09, 2020

Copy link to clipboard

Copied

I have a JavaScript answer to this if you're interested.

 

You could select Execute JavaScript as an onEnter action to your slide and insert this code in the box.

cp.changeState("buttonName","stateName");
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...

cp.changeState("webLinkbtn","Visited");

 

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources