Object disappears in visited state
Nov 26, 2012
Hi all,
I'm trying to reveal a piece of a picture when the user clicks on a graphic. I got it to work by copying everything but that graphic to a new layer, which reveals it fine, but something puzzles me...
I thought it might be easier to use states, so I set up the normal state for the graphic (covering the picture). Then I added a visited state where I deleted the graphic altogether. When I move between states, I see the graphic disappear on the screen, and I think I'm golden! Then I preview the page, and click the graphic and...nothing. It doesn't work.
I added a few more states (hover and selected) where the graphic is gone, and again they work when I'm clicking on the states, but not when I preview. I even tried just making the picture transparent, but that didn't work either.
So I duplicated into another layer, and that works, but why didn't the state change work? Or, is there another way to trigger a disappear animation on click? I lose my narration this way if they click early, because I had to hide the base layer objects so the audio stops (even though I unclicked 'pause base later timeline').
8 Replies
Lisa,
Could you post your file so we can take a look? I'm having a hard time visualizing.
Thanks!
Mike
Sure. Here's the file. The concept is that for each module the learner completes, they can reveal a room of the house. It works now that I added a second layer, but I'd like the object to just disappear when clicked.
If you look at the states, it looks like it would disappear (hover over the visited state).
Lisa,
Okay, I see what you're doing. I've tweaked yours a bit and reattached.
Basically, yours is technically working, but you're seeing odd behavior because the hover state is empty = flickering between picture and empty state. Also, the image will disappear once you click and remove your mouse icon from over the top of it. So, I'm finding that your file functions as expected.
What I would do is have a normal hovers state with, perhaps a different color, or outside glow (for the visual effect) and then set a trigger to change the state of the button to Hidden when the user clicks. This will achieve the same outcome but make it all a bit cleaner in terms of how it functions. And also eliminate the need to have multiple layers. I've attached your updated file to reflect this approach.
Hope this helps!
Mike
Thanks Mike! That's a much more elegant and efficient solution.
I am having the same sort of issue. I created a Replay button with an icon, it just has one hover state that changes the color. I have a hotspot about it to activate the hover state on hover and replay the slide on click. However after the slide replays the button dissapears? Help please, thanks!
Hi Mike!
Is there a reason why you included the hotspot?
If you delete the hotspot, the button will change to Hover automatically when the mouse hovers over it. You don't need a trigger for that.
Then, you can add a trigger to, "Jump to slide [current slide] when the user clicks the Reset button."
Give that a try, and let me know if you see a difference!
Yes, when working with the icons built into SL, they are vector or svgs, so the particular icon is a circle, if you hover over the inside of the circle you aren't really hovering on anything, aka the blank space of an icon isn't really an icon, if that makes sense?
Hi Mike,
Did you add in one of these icons from Content Library? If so, you'll see that they have grouped objects and based on that you could click between the individual elements. One thing I did to account for that in a file was add an additional shape to the group that was white and that way the middle of the shape was no longer transparent. Here's a quick look at how I did it:
This discussion is closed. You can start a new discussion or contact Articulate Support.