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="http://koi29.info/swish/index2.php" />
        <item label="Automatique" url="http://koi29.info/automatique/index.php" />
        <item label="Mecanique" url="http://koi29.info/mecanique/index.php" />
        <item label="Technologie" url="http://koi29.info/techno/index.php" />
        <item label="RdM" url="http://koi29.info/rdm/index.php" />
        <item label="Matlab" url="http://koi29.info/matlab/index.php" />
    </menu>

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.

Script

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...

 


Si vous aimez le site

 

Select a language if you need :


Page chargée en 0.025 sec.

Dernière Modification : Mer 25 Janvier 2017 8:56
Copyright © 1999-2017 Jean-Paul Molina Tous droits réservés.

to Google