Artwork & Layouts > Help

Flashing Image

(1/1)

netsurfr:
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?

Pieter Hulshoff:
Sure, just use an onIdle animation that fades in and out.

netsurfr:
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!

netsurfr:
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>

Navigation

[0] Message Index

Go to full version