Hello, i’m starting to learn AS3, and have a some troubles). I try to make an XML-based 2 level menu, try to use OOP…
i make a Loader class, it load xml and parsing him. Same i have MyMenu class that create menu, Section Class that makes section button, SubMenu class - make submenu and SubMenuBtn class…
XML like that:
<?xml version="1.0" encoding="utf-8" ?>
<menu TIME_A = "0.25"
SECTION_W = "210"
SECTION_H = "30"
SPACING = "5"
LESSER = "20" >
<item title = "Main" color1 = "0x12C7ED" color2 = "0x009DD9" func = "attachPage" arg1 = "anyArgument" />
<item title = "SeconSection" color1 = "0x0099FF" color2 = "0x0082D9" func = "" >
<item title = "Download a catalog" func = "getLink" arg1 = "anyArgument" />
<item title = "Download a price-list" func = "getLink" arg1 = "anyArgument" />
</item>
.........
and some of the parameters (like SECTION_W and SECTION_H) i have to use in SubMenuBtn class, how i can send that right? If i send all needed parametrs as arguments to MyMenu class consructor, i will have uncomfortably structure. If a will create menu in Loader class it will be uncomfortably too. Maybe anyone know more simple ways to create somethinng like that? I hope i describe all correctly.