Dropdown menu xml


The goal is to build a dropdown menu, reading a XML file only using a script.

⇒ animation ⇐

(in example links are phony ⇒ it's pointless clicking)

We gonna describe the stages right now.

Creating xml menu file

Using a text editor, enter the following lines :

<?xml version="1.0" encoding="ISO-8859-1" ?>
    <menu name="Menu1">
        <item label="SwishMax2" url="https://koi29.info/swish/index2.php" />
        <item label="Automatique" url="https://koi29.info/automatique/index.php" />
        <item label="Mecanique" url="https://koi29.info/mecanique/index.php" />
        <item label="Technologie" url="https://koi29.info/techno/index.php" />
        <item label="RdM" url="https://koi29.info/rdm/index.php" />
        <item label="Matlab" url="https://koi29.info/matlab/index.php" />

Save it as menu.xml

The parent node is <menu> with attribute name. Each child node item has got attributes label and url

Main movie

Stage 640x480. Frame rate = 30. Background color #336600.


You need a fair good understanding of POO despite the limitations of SwishMax.
We 'll use same methods as for the classical example with some adaptations.

In Scene_1, enter :

Et voil! It's up to you to improve...


Page chargée en 0.001 sec.

Dernière Modification : Jeu 7 Septembre 2023 10:26
Copyright © 1999-2023 Jean-Paul Molina Tous droits réservés.


to Google