Scripting question

Pretty new to this. All I need to do is have a rectangle object alternate visibility. So turn on, hold for a few seconds, turn off, hold for a few seconds, and repeat indefinitely.

I just cannot get this to work through. Really confused as to what “When” trigger I should be selecting, and what “Then” triggers I should be using.

This object is not interactive. It’s just a thing that animates on its own. Whenever I try to add a toggle visibility action, it insists on fading the object. Cant get something simple like this to work right. Would have been very easy in something like Flash.

If you want to set the action to be triggered by entering the scene, then it’s When “Scene” has been entered, (with rectangle in scene structure) Then Set Opacity to be Animated with Frequency set to Indefinitely, Reverse at end, and then you can play with the Delay at the bottom to achieve the desired result.

So I actually just tried that, and it’s animating the fade. I just want the object to be on for x seconds, turn off for x seconds, repeat, but no matter what I try it insists on animating a fade.

Can you post the hide screenshot as well? Thx for all your help!

This is as close as I can get. Maybe someone else will have a better suggestion. Start by hiding it, then show it with a really short duration to cut down on the appearance of fade, then play with delay.

Yeah I just cant get this to work because I need the object to stay on for a few seconds, not turn off immediately because we are trying to hide the fade.

Here’s a screenshot for Hide. This one should not be animated (unchecked box on the right side). If it’s hidden off the bat, and your Show action is animated with a 0.1 duration, this will virtually eliminate the appearance of fading.

The duration is why this isnt working right. I need the object to stay on for like 3 seconds, not .1 seconds. So whats happening when I set this up the way you have it, the object is just turning on and off quickly.

Not knowing what color your rectangle and background are, it’s difficult to account for your scenario. But if they’re both solid colors, maybe a rectangle the same color as your background could sit on top of the rectangle you want to “appear” as showing, and it could be animated like this.

I’m curious if someone else has a better suggestion for achieving this “on for x seconds, off for x seconds” effect.

Im basically just trying to turn the lights on and off in some city buildings in the background of a scene. Really trying to avoid doing this as a movie in after effects.

This is really easy to do in something like Flash. Im surprised they force the fade on you. Should be a really simple thing, turn it on, hold, turn it off, hold.

Agreed. There should be more options under Animation Type. I came from a Flash background as well, and this would be super-easy to achieve in that application.

Can you share a screenshot of what you’re working on for reference?

Its just an interactive map with a city illustration in the background. Want to animate some of the lights on and off.

Okay, I see. It’s the "holding’ in both states that I’m not sure on how to achieve, outside of placing GIFs over the windows.

Yeah Im sitting here for 2 hours messing with all the settings and just cant get it to work the way I want. Really thought going in this would be something so easy to do. What they need is under that animated field where the options are fade and zoom, there should be another option called toggle. Lets you just turn it on and off, and hold on each state for x seconds. Right now you can only fade them which is so crazy to me. I would have thought this would have been one of the very first things they built into this even before fading. Lol

The forced fade is why the duration part is a problem. I need to be able to use the duration to hold for x seconds, but we are trying to use the duration to hide the fade, so its impossible to make this work like that.

OR, another way to make this work if anyone working at intuiface sees this, the show/hide options are so close to doing what I need, except that since I cant set keyframes in the timeline, I cant repeat it turning on and off. I can only do it once since as soon as I check the animated box, then Im forced to fade it again. But there is no timeline keyframes which severely limits the kind of animation we can do as compared to flash.

I’m glad you used the word toggle, because you could use a button to do this instead. Although there is an image toggle button you can use in Assets, it might be way easier to use the Image Button under Interactive Assets in the Assets palette. It has a place to enter a Released Image and a Pressed Image in the Properties palette under Images.

From there you can have a trigger with an action assigned to Simulate a tap on that button, so you can time when you want each Simulate a tap to occur, but unfortunately it’s not repeatable, so you’d end up making your repetitions on the timeline.