2006-10-16, 08:13
I have been searching for two days now, but I cannot find much information about References.xml, or includes.xml. I think I've got them mostly figured out, but I'm still having problems with references and I'm hoping for some help.
First, what I think is the right way to use these files:
includes.xml: Put code snipets here that will be used on several controls, using name="blah", then calling it by name with include tags in other .xml files... This only works when the name is typed in all lowercase letters.
references.xml: Put generic controls here that can be loaded in other .xml files, allowing for a standard control that you can "shorthand" by only using tags that need to change from default in other places.
The problem I'm having is that only the first thing defined in references.xml seems to be recognized when I use the control somewhere else. EG: I have three control definitions in references.xml, I try to call these in home.xml, but only the first one works. I have tried different ids, and I have tried changing the order in which they appear, and nomatter which one is defined first, only it will work as I think they should.
Here is my code from references.xml:
This is from home.xml:
If I put it in home.xml it works perfectly, but these are all things that I think I'll be trying to use on many pages so I thought they should go in references.xml...
Anyway, I hope this hasn't been to long, and I really appreciate any help with this. I'll check back tomorrow and hope for the best.
Thanks -- Krusty
First, what I think is the right way to use these files:
includes.xml: Put code snipets here that will be used on several controls, using name="blah", then calling it by name with include tags in other .xml files... This only works when the name is typed in all lowercase letters.
references.xml: Put generic controls here that can be loaded in other .xml files, allowing for a standard control that you can "shorthand" by only using tags that need to change from default in other places.
The problem I'm having is that only the first thing defined in references.xml seems to be recognized when I use the control somewhere else. EG: I have three control definitions in references.xml, I try to call these in home.xml, but only the first one works. I have tried different ids, and I have tried changing the order in which they appear, and nomatter which one is defined first, only it will work as I think they should.
Here is my code from references.xml:
Code:
<controls>
<control>
<description>default background image</description>
<type>image</type>
<id>1</id>
<posx>0</posx>
<posy>0</posy>
<width>720</width>
<height>576</height>
<texture>shared\MainBackground.png</texture>
<visible>![Player.HasAudio + System.IdleTime(60)]</visible>
</control>
<control>
<description>main info background</description>
<type>image</type>
<id>22</id>
<posx>170</posx>
<posy>33</posy>
<width>521</width>
<height>64</height>
<texture>shared\MainInfoBackground.png</texture>
<visible>![Player.HasAudio + System.IdleTime(60)]</visible>
<animation effect="slide" start="0,470" time="700" delay="200" condition="!Skin.HasSetting(animated)">WindowOpen</animation>
<animation effect="slide" end="0,470" time="700" delay="200" condition="!Skin.HasSetting(animated)">WindowClose</animation>
</control>
<control>
<description>default peepHole border</description>
<type>image</type>
<id>21</id>
<posx>174</posx>
<posy>97</posy>
<width>515</width>
<height>328</height>
<texture>shared\PeepHoleBorder.png</texture>
<visible>![Player.HasAudio + System.IdleTime(60)]</visible>
<animation effect="zoom" start="0" end="100" center="360,240" time="700" delay="200" condition="!Skin.HasSetting(animated)">WindowOpen</animation>
<animation effect="zoom" start="100"end="0" center="360,240" time="700" delay="200" condition="!Skin.HasSetting(animated)">WindowClose</animation>
</control>
</controls>
This is from home.xml:
Code:
<control>
<description>default background image</description>
<type>image</type>
<id>1</id>
</control>
<control>
<description>default peepHole border</description>
<type>image</type>
<id>21</id>
</control>
<control>
<description>main info background</description>
<type>image</type>
<id>22</id>
</control>
If I put it in home.xml it works perfectly, but these are all things that I think I'll be trying to use on many pages so I thought they should go in references.xml...
Anyway, I hope this hasn't been to long, and I really appreciate any help with this. I'll check back tomorrow and hope for the best.
Thanks -- Krusty