Author Topic: Flashing Image  (Read 2791 times)

netsurfr

  • Newbie
  • *
  • Posts: 14
  • Karma: +1/-0
    • View Profile
Flashing Image
« 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?

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1543
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Flashing Image
« Reply #1 on: July 03, 2021, 05:29:05 PM »
Sure, just use an onIdle animation that fades in and out.

netsurfr

  • Newbie
  • *
  • Posts: 14
  • Karma: +1/-0
    • View Profile
Re: Flashing Image
« Reply #2 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!

netsurfr

  • Newbie
  • *
  • Posts: 14
  • Karma: +1/-0
    • View Profile
Re: Flashing Image
« Reply #3 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>
« Last Edit: July 04, 2021, 01:49:58 AM by netsurfr »