Looping Animations
#1
I'm trying to create an effect of smoke moving across the bottom of the home window, I've been trying to do this using the slide animation and I've come to the conclusion that it's impossible to do without a looping feature.

I've looked all over the place and I don't think it's possible to loop any of the animations apart from the fade one using "pulse" and the fade in multiimage using "loop".

Would it be a possibility that a loop feature could be added in future to the animations?
Reply
#2
Loop is allready in and should be used the same as Pulse
Reply
#3
so this should work:

<animation effect="slide" start="-120,0" time="200" loop="true">WindowOpen</animation>

when i use it like that it just slides along once then stops, it does not loop.

any ideas?
Reply
#4
loop animations require a conditional type. I don't know if slide works, but you can try:

Code:
<animation effect="slide" start="-120,0" time="200" loop="true" condition="Window.IsVisible(#)">Conditional</animation>

Or some condition:

I use:
Code:
<animation effect="rotatey" center="585" start="0" end="-360" time="5000"  loop="true" condition="Control.IsVisible(4000)">Conditional</animation>
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#5
i cant get either of those to work like. i tried copying the one you use and still got nothing, not even the animation nevermind the loop. heres what i used:

Quote:<control>
<description>background image</description>
<type>image</type>
<id>1</id>
<posx>0</posx>
<posy>0</posy>
<width>720</width>
<height>576</height>
<texture>smoke.png</texture>
<animation effect="rotate" center="585" start="0" end="-360" time="5000" condition="Window.IsVisible(0)">Conditional</animation>
</control>
Reply
#6
First I guess is the home window on the screen second set the condition to true like this to make it always happen
<animation effect="rotate" center="585,100" start="0" end="-360" time="5000" condition="True" loop="true">Conditional</animation>
third make sure your actually using a recent XBMC various bus were fixed about 2 weeks ago or so

P.S center="0,0" <-- needs an x and a y
Reply
#7
Looks like I had the version of xbmc just before they fixed whatever the problem was, working fine now I've updated.

Thanks for the help guys! Much appreciated!
Reply
#8
I'm curious how the slide animation works for a smoke effect. Is it better than a multiimage control.

Fewer images with the animation though, just curious how it looks.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#9
For the smoke i started off with the idea of having multiple images that scroll one after another and repeat. this didnt work so now i just have one long smoke image that repeats. it looks ok i think, hopefully i'll upload it when i get it done!

Right, I have another problem, I'm trying to get this picture below to fade out differently than it fades in, at the minute it fades in and out with a delay of 1500 and with a time of 1500, now what I would like it to do would be to fade out with no delay and a time of around 200. Is this possible?

here is the code for the image

Quote:<control type="image" id="9872">
<description>Moon</description>
<texture>NEWmoon.png</texture>
<posx>0</posx>
<posy>0</posy>
<width>720</width>
<height>576</height>
<colordiffuse>FFFFFFFF</colordiffuse>
<colorkey>FFFF00FF</colorkey>
<aspectratio>keep</aspectratio>
<animation effect="fade" start="0,-30" time="1500" delay="1500" condition="Control.HasFocus(1)">Conditional</animation>
<animation effect="fade" time="800">WindowOpen</animation>
<animation effect="fade" time="800">WindowClose</animation>
</control>

I'm guessing I will need another line of this

Quote:<animation effect="fade" start="0,-30" time="1500" delay="1500" condition="Control.HasFocus(1)">Conditional</animation>

but with the values changed and the conditions different.

This image is being used on the Home window.

Any help is much appreciated!
Reply
#10
You only want it visible when control 1 has focus?

If so, use <visible>Control.HasFocus(1)</visible>, along with a Visible and Hidden animation.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#11
I don't think I explained it very well in my last post.

I have this

Quote:<control type="image" id="9873">
<description>Lightning</description>
<texture>NEWlightning.png</texture>
<posx>0</posx>
<posy>0</posy>
<width>720</width>
<height>576</height>
<colordiffuse>FFFFFFFF</colordiffuse>
<colorkey>FFFF00FF</colorkey>
<aspectratio>keep</aspectratio>
<visible allowhiddenfocus="true">Control.HasFocus(1)</visible>
<animation effect="slide" start="0,-576" time="400" delay="3000">Visible</animation>
<animation effect="fade" start="0" time="1200">Hidden</animation>
<animation effect="fade" time="800">WindowOpen</animation>
<animation effect="fade" time="800">WindowClose</animation>
</control>

the two lines which I'm particularly looking at are:

Quote:<animation effect="slide" start="0,-576" time="400" delay="3000">Visible</animation>
<animation effect="fade" start="0" time="1200">Hidden</animation>

the "visible" animation slides in fine but the hidden fade one doesn't seem to work, the image just disappears off the screen without fading.

Any ideas?
Reply
#12
start="0" means start hidden.

You either don't want any start (it'll assume start=100) or set start="100".
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#13
oops! it's always the simplest of things! haha. works fine now.

Thanks man, you have been most helpful.
Reply

Logout Mark Read Team Forum Stats Members Help
Looping Animations0