Howto:Add new fgcommands to FlightGear: Difference between revisions

Jump to navigation Jump to search
m
Line 64: Line 64:
  fgcommand("null", "/temp1");
  fgcommand("null", "/temp1");
</syntaxhighlight>
</syntaxhighlight>
You could just as well use a temporary property tree object, rather than the global property tree:
<syntaxhighlight lang="php">
var myTree = props.Node.new( {"filename": "stars.jpeg"} );
fgcommand("null", myTree);
</syntaxhighlight>
This would turn the hash initialized into a property tree structure, an even shorter version would be:
<syntaxhighlight lang="php">
fgcommand("null", rops.Node.new( {"filename": "stars.jpeg"} ) );
</syntaxhighlight>




Navigation menu