homepage Welcome to WebmasterWorld Guest from 54.227.34.0
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / XML Development
Forum Library, Charter, Moderators: httpwebwitch

XML Development Forum

    
Can anyone give me a hand with this?
ajweber



 
Msg#: 4123414 posted 5:55 am on Apr 28, 2010 (gmt 0)

Hi,

I'm new to XML coding and I've got a problem I need help with. I'm developing a model in .gmax for FSX and I'm attempting to trigger animated objects using a switch that determines which animation to run. I know the following example isn't correct, I use this illustrate what I'm trying to do:

<PartInfo>
<Name>xyz_switch</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(L:xyz_01, bool) 100 *
(L:xyz_02, bool) 100 *
(L:xyz_03, bool) 100 *
(L:xyz_04, bool) 100 *
</Code>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<CallbackCode>
(L:xyz_01, bool) 0 > if{ (L:xyz_01, bool) 0 } els{ 1 }
(L:xyz_02, bool) 0 > if{ (L:xyz_01, bool) 0 } els{ 1 } <if xyz_01 is has already been activated, then run xyz_02>
(L:xyz_03, bool) 0 > if{ (L:xyz_02, bool) 0 } els{ 1 }<if xyz_01 and xyz_02 have already been activated, then run xyz_03>
(L:xyz_04, bool) 0 > if{ (L:xyz_03, bool) 0 } els{ 1 }<if xyz_01, 02 and 03 have been activated, then run xyz_04>
(L:xyz_05, bool) 0 > if{ (L:xyz_04, bool) 0 } els{ 1 }<if xyz_01,02,03 and 04 have been activated, then run xyz_05>
</CallbackCode>
</MouseRect>
</PartInfo>


Up to now, I've been trudging through and figuring out the code I've needed for new parts I'm creating, but this one's got me stumped! Again, I'm new to writing XML!

Can anyone give me a hand with this?

Thanks!

AJ

 

httpwebwitch

WebmasterWorld Administrator httpwebwitch us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4123414 posted 12:21 pm on Apr 28, 2010 (gmt 0)

inside the <CallbackCode> element, you have invalid characters

When you have a ">" or "<" character in XML they have to be encoded as "&lt;" and "&gt;"

httpwebwitch

WebmasterWorld Administrator httpwebwitch us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4123414 posted 3:42 pm on Apr 28, 2010 (gmt 0)

sorry, reverse that. "<" is &lt;

you know what I mean

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / XML Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved