fade animation triggered by home menu scrolling
#1
I have an image that fades in when I scroll the home menu to music. If I click on music and go to a file or just go back to the main menu without playing any music it fades in again just as expected the script looks like this:

<animation effect="fade" start="0" end="100" time="3000">WindowOpen</animation>
<animation effect="fade" start="100" end="0" time="10">WindowClose</animation>

As can be seen as soon as I move away by going to another window it 'resets the fade back to 0
Trouble is that if I scroll past the music window to Programs window or scroll back to the previous window (Movies) and then back to the music window it hasn't 'reset' The image is still in. That is, it's already there, it doesn't fade in again. If I go to movies or Programs or Weather or anywhere else and open with 'onclick' then go back it fades in again.
I've tried several conditions like:
<animation effect="fade" start="100" end="0" time="10" condition="Container(9000).HasFocus(3)">Conditional</animation>
where the number 3 is the id for one of the other windows. Nothing has worked so far.
Any suggestions welcomed
Reply
#2
anybody?
Reply
#3
I'm having the same problem and I don't know how to fix it. I'm trying to get an image control to fade in every time I select a given item on the main menu. So far no luck.. please, someone help! Smile

I should add that the image successfully fades in the first time that I select the menu item, but does not repeat the action if I return to that item without refreshing the home window.
Reply
#4
Lol. I'm a dope. When in doubt read the manual. The reason the animation wasn't repeating after the control is because you must have had an "end" state defined in your code. This terminates the animation unless the window is refreshed. The kodi skin manual states "The end state of the control for this transistion. Similar to the start state, except that the end state is always kept after the animation is finished, and until the control changes its state."

In other words, don't include an end state and you will be fine.
This is the code that worked for me:

<control type="image" id="1">
<description>My first image control</description>
<width>100</width>
<height>100</height>
<aligny>center</aligny>
<visible>true</visible>
<texture>IMAGE2.JPG</texture>
<visible>Container(9000).HasFocus(3)</visible>
<animation effect="fade" time="3000" delay="200" reversible="false">VisibleChange</animation>
</control>

<control type="image" id="1">
<description>My first image control</description>
<width>100</width>
<height>100</height>
<aligny>center</aligny>
<visible>true</visible>
<texture>IMAGE1.JPG</texture>
<visible>Container(9000).HasFocus(4)</visible>
<animation effect="fade" time="3000" delay="200" reversible="false">VisibleChange</animation>
</control>
Reply

Logout Mark Read Team Forum Stats Members Help
fade animation triggered by home menu scrolling0