<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AAnimatedImageStartAnimation</id>
	<title>API:AnimatedImageStartAnimation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AAnimatedImageStartAnimation"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:AnimatedImageStartAnimation&amp;action=history"/>
	<updated>2026-10-17T18:49:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:AnimatedImageStartAnimation&amp;diff=30173&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:AnimatedImageStartAnimation&amp;diff=30173&amp;oldid=prev"/>
		<updated>2026-10-16T19:40:24Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=AnimatedImage}}&lt;br /&gt;
Starts playing an AnimatedImage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AnimatedImageStartAnimation(imageName, startFrame, loop, hideWhenComplete, delay)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;imageName : &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; – Name of an AnimatedImage window.&lt;br /&gt;
;startFrame : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Frame number. The stock UI always passes &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. Fractions are dropped.&lt;br /&gt;
;loop : &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; – &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; to start again from the first frame after the last one, &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; to play once.&lt;br /&gt;
;hideWhenComplete : &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; – &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; to hide the image when a non-looping animation ends.&lt;br /&gt;
;delay : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Seconds to wait before the animation starts. &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; starts it at once.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Nothing.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* If &amp;lt;code&amp;gt;startFrame&amp;lt;/code&amp;gt; is greater than the number of frames in the animation, the call does nothing.&lt;br /&gt;
* The function does not show the window. The stock UI shows it first (see the example).&lt;br /&gt;
* When a non-looping animation reaches its end, it stops; with &amp;lt;code&amp;gt;hideWhenComplete&amp;lt;/code&amp;gt; the image is also hidden.&lt;br /&gt;
* The playing speed can be changed with [[API:AnimatedImageSetPlaySpeed|AnimatedImageSetPlaySpeed]].&lt;br /&gt;
* &amp;lt;code&amp;gt;loop&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;hideWhenComplete&amp;lt;/code&amp;gt; must be real booleans. Passing &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt; or a number raises an &amp;#039;&amp;#039;Invalid Parameters&amp;#039;&amp;#039; error.&lt;br /&gt;
* Note the wording of the second error message: it has no &amp;quot;Window&amp;quot; before the name.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
* &amp;lt;code&amp;gt;Error in function call &amp;#039;AnimatedImageStartAnimation&amp;#039;: Window %s does not exist&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;Error in function call &amp;#039;AnimatedImageStartAnimation&amp;#039;: %s is not an AnimatedImage&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
A looping indicator, from &amp;lt;code&amp;gt;ea_menubarwindow/source/menubarwindow.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ( SystemData.StreamingData.isStreaming )&lt;br /&gt;
then&lt;br /&gt;
    WindowSetShowing( &amp;quot;StreamingIndicator&amp;quot;, true )&lt;br /&gt;
    WindowSetShowing( &amp;quot;StreamingIndicatorAnim&amp;quot;, true )&lt;br /&gt;
    AnimatedImageStartAnimation( &amp;quot;StreamingIndicatorAnim&amp;quot;, 0, true, false, 0 )&lt;br /&gt;
else&lt;br /&gt;
    AnimatedImageStopAnimation( &amp;quot;StreamingIndicatorAnim&amp;quot; )&lt;br /&gt;
    WindowSetShowing( &amp;quot;StreamingIndicatorAnim&amp;quot;, false )&lt;br /&gt;
    WindowSetShowing( &amp;quot;StreamingIndicator&amp;quot;, false )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A page flip that plays once after a delay and then hides itself, from &amp;lt;code&amp;gt;ea_loadingscreen/source/standardloadingscreen.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AnimatedImageStartAnimation( windowName..&amp;quot;PageFlipAnim&amp;quot;, 0, false, true, animDelay )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:AnimatedImageStopAnimation|AnimatedImageStopAnimation]]&lt;br /&gt;
* [[API:AnimatedImageSetPlaySpeed|AnimatedImageSetPlaySpeed]]&lt;br /&gt;
* [[API:AnimatedImageSetTexture|AnimatedImageSetTexture]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>