Simulate "visited" state


#1

Hi, I’m non a developer but I should do a simple thing.
I have an homepage with 8 transparent buttons, on rollover the borders are displayed. I have 8 scenes linked to each buttons. I need to simulate a visited effect by setting as visible some semitransparent rectangles, probably I have set global variables to save the state of these elements. Can someone help me please?

Thank you


#2

As straightforward as your request sounds, seeing an example of your project would be useful as there can sometimes be other issues in your set-up that would affect an accurate solution.


(Mark Hunte) #3

Agree with @JimScott, Just asking without examples means to help you we may have to try and create from scratch.

We do not always have the time, will or enough info to do this.

If we do, we likely will get some part or all wrong and more questions follow…

Saying that, I did have a bit of time and will to show one way and let you muddle your way through it… :sunglasses:

scene visited vMH1.hype.zip (33.9 KB)

All code is in the Head.


#4

You’re right!
You can see the work here: sportsponsorship2018.it (user&pass: lavazza)

Thank you!


#5

Thank you Mark!
I have to do something like that but the elements to modify are all on the same initial scene, a sort of hompage.


#6

In this demo the “visited” buttons are set to 70% opacity when returning to the “homepage” screen from one of the other scenes (based on @MarkHunte’s original code):
scene visited vMH1-JHSv1.hype.zip (27.7 KB)


#7

Thank you Jim,
that is good but I have buttons that starts with 100% of transparency and seems that the code works only if the button is at higher level of opacity.


#8

The buttons in Jim’s example do start at 100% opacity, but also note that the unique element ID of the buttons showing the visited state is set to the scene name – so make sure you are doing that in your document as well. If that’s not working, can you share your document with this in place?


#9

Yes Daniel, and i wrote transparency, indeed I meant 0%opacity. How can I share the file in private?


#10

@maucox

I think I am understanding things better: scene visited vMH1-JHSv3.hype.zip (28.2 KB)

• The “buttons” (rectangles) that link to scene 2 & 3 are transparent (0% opacity) with side borders;
• The side borders of the buttons thicken on “mouse over” (could change color too - not in this demo).
• When returning to “Scene 1” from another Scene - the related button background is set to a light gray with a 20% opacity. Please see Fig. 1 below.

This demo is not trying to match your design - just show You the scripting concept
(located in the “Head HTML”). Please see Fig. 1 below.


Fig.1
VisitedState


Thanks @MarkHunte for the help with your code. :+1:


(Mark Hunte) #11

No problem. The code now uses the array better due to to your changes in the scene interactions. :+1:
We now use the array correctly and iterate over the names/ids in it instead of using the current scene.

This type of example should be know as: skinacat , I’m coining it…


#12

Thank you very much Jim!!!
Your code works perfectly. I’ve applied it to separate boxes (not directly on the buttons) in order to solve some mouseover effects.


#13

You’re welcome! :tada:

The code & basic project set-up is mainly from @MarkHunte - I just did some tweaking. :pencil2:


#14

Great team working! :wink:
Thank you Mark!


#15

Dear Mark and Jim,
I’m sad to re-open this thread, unfortunately my client use IE 11 and… the scripts doesn’t work. It is possible, is IE the usual nightmare?
Thank you in advance for the patience.
Maurizio


(Mark Hunte) #16

I never normally test in IE. It is discontinued so as far as I am concerned there is no point and I personally hate it.

I do not have IE on any of my Macs or PCs that I can use so I am not going to be able to help much.

The code is pretty basic. I can possibly look to see if any of it is to modern for IE when I get back to a Mac


#17

Thank you anyway Mark!
Maybe a different way of IE to manage the opacity…


#18

@maucox

I do not use IE11 either so I can not (easily) test the following from stackoverflow.

The opacity issue is a known (opacity) bug apparently and there is a work around suggested in the aforementioned link.

Hope this leads You to a solution.


#19

Hi Jim, unfortunately it doesn’t solve the issue.
Thank you anyway for you effort!


(Freelancer) #20

an alternative solution could be creating a “continue timeline” with the option “Can restart timeline” disabled for the opacity. in this way the opacity is editable only one time.

it works (without further manual code) only if you have all pages inside the same project.

I’m not sure this is exactly what you need but this is a free code solution

Screen%20Shot%202