Jump to content


Photo

Somebody Want To Explain This


  • Please log in to reply
4 replies to this topic

#1 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 29 February 2004 - 01:24 AM

I see the stuff in the ActionScriptReadMe.txt but it's got me confused.
LoadDialogFromXML <UIHandle> <XMLHandle> <XMLLocation>

Now would this be how it works if you had multiple dialogs in one XML file?

XMLOpen ScriptXML $ActualPath$\Scripts\SomeScript\SomeScript.xml
LoadDialogFromXML FirstDLG ScriptXML !.FirstDialogToLoad
LoadDialogFromXML SecongDLG ScriptXML !.SecondDialogToLoad

Is the XMLHandle like a Variable of sorts for the main script\dialog xml file location? That way you don't have to keep specifying the file location whenever you want to create a dialog? And does this mean that if you use XMLClose then your dialog will mess up (Like you can't GET or SET values)?

Edited by flattspott, 29 February 2004 - 01:25 AM.


#2 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 29 February 2004 - 02:05 AM

QUOTE (flattspott @ Feb 28 2004, 10:24 PM)
I see the stuff in the ActionScriptReadMe.txt but it's got me confused.
LoadDialogFromXML <UIHandle> <XMLHandle> <XMLLocation>

Now would this be how it works if you had multiple dialogs in one XML file?

XMLOpen ScriptXML $ActualPath$\Scripts\SomeScript\SomeScript.xml
LoadDialogFromXML FirstDLG ScriptXML !.FirstDialogToLoad
LoadDialogFromXML SecongDLG ScriptXML !.SecondDialogToLoad

Is the XMLHandle like a Variable of sorts for the main script\dialog xml file location? That way you don't have to keep specifying the file location whenever you want to create a dialog? And does this mean that if you use XMLClose then your dialog will mess up (Like you can't GET or SET values)?

The example you types in is exactly how it's used.

You open an XML object, then create new Dialog UI Objects from nodes within the XML.

Alternatively, you might have:

CODE

XMLOpen ScriptXML $ActualPath$\Scripts\SomeScript\SomeScript.xml
LoadDialogFromXML FirstDLG ScriptXML !.Dialogs.Dialog?DlgID=IPSetupOne
LoadDialogFromXML SecongDLG ScriptXML !.Dialogs.Dialog?DlgID=IPSetupTwo


to take advantage of the new query locational method.

...and yes, you should keep the XML object around for the life of the dialogs, unless it's an internal XML node.

Edited by BenJeremy, 29 February 2004 - 02:06 AM.


#3 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 29 February 2004 - 03:11 AM

So what I had would work then, but I could also do it the other way you posted?

#4 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 29 February 2004 - 03:23 AM

QUOTE (flattspott @ Feb 29 2004, 12:11 AM)
So what I had would work then, but I could also do it the other way you posted?

Exactly.

I added the query format because it's far superior for tracking dialogs and controls within nodes.



#5 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 29 February 2004 - 05:50 PM

Yes it is superior. No more counting nodes and forgetting to start at 0. smile.gif




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users