PDA

View Full Version : conditonal animation problem


Jeroen
2009-04-05, 12:39
I'm having trouble with using conditions on multiple animations

here's what I want to do.

<animation effect="rotatey" center="1059" start="0" end="-90" time="250" loop="false" condition="Control.HasFocus(8000)">Conditional</animation>

which works fine.

However I want to combine this animation with a second animation type, based on the condition.

This doesn't work:

<animation type="Conditional">
<effect type="rotatey" start="0" end="-90" center="1059" time="250" condition="Control.HasFocus(8000)" />
<effect type="fade" start="100" end="45" time="250" condition="Control.HasFocus(8000)" />
</animation>

Although it makes sense to me :rolleyes:

Do I need to do this differently or is it simply not possible to do conditionals on multiple animations?

Jezz_X
2009-04-05, 13:10
The condition goes in the first line like so
<animation type="Conditional" condition="Control.HasFocus(8000)">
<effect type="slide" start="-150,0" end="-160,0" time="100" />
<effect type="slide" start="0,0" end="160,0" delay="100" time="100" />
</animation>

Jeroen
2009-04-05, 14:14
The condition goes in the first line like so
<animation type="Conditional" condition="Control.HasFocus(8000)">
<effect type="slide" start="-150,0" end="-160,0" time="100" />
<effect type="slide" start="0,0" end="160,0" delay="100" time="100" />
</animation>


Doh! that seems logical :D
Thanks Jezz_X