RetroFE forums

Artwork & Layouts => Help => Topic started by: netsurfr on July 03, 2021, 01:15:02 AM

Title: Flashing Image
Post by: netsurfr on July 03, 2021, 01:15:02 AM
I would like to place an arrow that flashes on/off (to call the players attention to something) on the layout. Tried using an animated gif but that doesn’t seem to work so is there another way to mimic an animated ON//OFF image?
Title: Re: Flashing Image
Post by: Pieter Hulshoff on July 03, 2021, 05:29:05 PM
Sure, just use an onIdle animation that fades in and out.
Title: Re: Flashing Image
Post by: netsurfr on July 03, 2021, 05:51:43 PM
Ok I'll see if I can figure this out. I thought one could only use animations on reloadable images that are named the same as the rom/game. I'm a total newb to coding and xml so sorry if I'm asking a super obvious question! Thanks!
Title: Re: Flashing Image
Post by: netsurfr on July 03, 2021, 11:08:43 PM
Got it! Used the code below & works like a charm. Thanks again!

<image src="images/buttons.png" x="0" y="950" height="50" alpha="1" width="stretch" layer="3">
  <onIdle>
    <set duration="2">
      <animate type="alpha" from="1" to="0.1" algorithm="easeinquadratic"/>
    </set>
    <set duration="1">
      <animate type="alpha" from="0.1" to="1" algorithm="easeinquadratic"/>
    </set>
  </onIdle>
</image>