Hi,
What's wrong with this code ? I'm getting sub menus "A", "B", "C",....... under CallInfo as well as under Settings.
Under CallInfo it should display "Missed Calls", "Call List",.......
Thanks
****************************************
Initialize();
// Initialize Function
function Initialize() {
Busy == False;
SetData();
BuildMenus();
}
// Set Data Function
function SetData() {
// Create arrays to hold menu and item data
Menus = new Array(4);
Menu0Items = new Array(3);
Menu1Items = new Array(9);
Menu2Items = new Array(6);
Menu3Items = new Array(5);
Menu4Items = new Array(9);
// Create an object for each element in the Menus array
Menus[0] = new Object();
Menus[1] = new Object();
Menus[2] = new Object();
Menus[3] = new Object();
Menus[4] = new Object();
// Populate the menu and item data
Menus[0].Name = "How do I ?";
Menus[0].Width = 65;
Menus[0].Items = Menu0Items;
with (Menus[0]) {
Items[0] = "make and receive calls"
Items[1] = "store/retrieve numbers";
Items[2] = "send/receive messages";
Items[3] = "browser functions";
}
Menus[1].Name = "Phone Book";
Menus[1].Width = 85;
Menus[1].Items = Menu1Items;
with (Menus[1]) {
Items[0] = "Find and Call";
Items[1] = "Add Number";
Items[2] = "Find and Edit";
Items[3] = "Voice Labels";
Items[4] = "Groups";
Items[5] = "Email Addresses";
Items[6] = "Calling Cards";
Items[7] = "Options";
Items[8] = "Memory Status";
Items[9] = "Fixed/ SOS Numbers";
}
Menus[2].Name = "Messages";
Menus[2].Width = 100;
Menus[2].Items = Menu2Items;
with (Menus[2]) {
Items[0] = "Call Voicemail";
Items[1] = "Inbox";
Items[2] = "Send New";
Items[3] = "Unsent";
Items[4] = "Templates";
Items[5] = "Sent Items";
Items[6] = "Options";
}
Menus[3].Name = "Call Info";
Menus[3].Width = 85;
Menus[3].Items = Menu3Items;
with (Menus[3]) {
Items[0] = "Missed Calls";
Items[1] = "Call List";
Items[2] = "Call Costs";
Items[3] = "Call Timers";
Items[4] = "Next Call";
Items[5] = "Options";
}
Menus[4].Name = "Settings";
Menus[4].Width = 85;
Menus[4].Items = Menu3Items;
with (Menus[4]) {
Items[0] = "A";
Items[1] = "B";
Items[2] = "C";
Items[3] = "D";
Items[4] = "E";
Items[5] = "F";
Items[6] = "G";
Items[7] = "H";
Items[8] = "I";
Items[9] = "J";
}
}
function BuildMenus() {
XPosition = 0;
for (Counter = 0; Counter < Menus.Length; Counter ++) {
XPosition = XPosition + Menus[Counter].Width;
_root.AttachMovie("Menu", "Menu" add Counter, 100 + Counter);
eval("Menu" add Counter).Name = Menus[Counter].Name
eval("Menu" add Counter)._x = XPosition;
eval("Menu" add Counter)._y = 10;
}
}
What's wrong with this code ? I'm getting sub menus "A", "B", "C",....... under CallInfo as well as under Settings.
Under CallInfo it should display "Missed Calls", "Call List",.......
Thanks
****************************************
Initialize();
// Initialize Function
function Initialize() {
Busy == False;
SetData();
BuildMenus();
}
// Set Data Function
function SetData() {
// Create arrays to hold menu and item data
Menus = new Array(4);
Menu0Items = new Array(3);
Menu1Items = new Array(9);
Menu2Items = new Array(6);
Menu3Items = new Array(5);
Menu4Items = new Array(9);
// Create an object for each element in the Menus array
Menus[0] = new Object();
Menus[1] = new Object();
Menus[2] = new Object();
Menus[3] = new Object();
Menus[4] = new Object();
// Populate the menu and item data
Menus[0].Name = "How do I ?";
Menus[0].Width = 65;
Menus[0].Items = Menu0Items;
with (Menus[0]) {
Items[0] = "make and receive calls"
Items[1] = "store/retrieve numbers";
Items[2] = "send/receive messages";
Items[3] = "browser functions";
}
Menus[1].Name = "Phone Book";
Menus[1].Width = 85;
Menus[1].Items = Menu1Items;
with (Menus[1]) {
Items[0] = "Find and Call";
Items[1] = "Add Number";
Items[2] = "Find and Edit";
Items[3] = "Voice Labels";
Items[4] = "Groups";
Items[5] = "Email Addresses";
Items[6] = "Calling Cards";
Items[7] = "Options";
Items[8] = "Memory Status";
Items[9] = "Fixed/ SOS Numbers";
}
Menus[2].Name = "Messages";
Menus[2].Width = 100;
Menus[2].Items = Menu2Items;
with (Menus[2]) {
Items[0] = "Call Voicemail";
Items[1] = "Inbox";
Items[2] = "Send New";
Items[3] = "Unsent";
Items[4] = "Templates";
Items[5] = "Sent Items";
Items[6] = "Options";
}
Menus[3].Name = "Call Info";
Menus[3].Width = 85;
Menus[3].Items = Menu3Items;
with (Menus[3]) {
Items[0] = "Missed Calls";
Items[1] = "Call List";
Items[2] = "Call Costs";
Items[3] = "Call Timers";
Items[4] = "Next Call";
Items[5] = "Options";
}
Menus[4].Name = "Settings";
Menus[4].Width = 85;
Menus[4].Items = Menu3Items;
with (Menus[4]) {
Items[0] = "A";
Items[1] = "B";
Items[2] = "C";
Items[3] = "D";
Items[4] = "E";
Items[5] = "F";
Items[6] = "G";
Items[7] = "H";
Items[8] = "I";
Items[9] = "J";
}
}
function BuildMenus() {
XPosition = 0;
for (Counter = 0; Counter < Menus.Length; Counter ++) {
XPosition = XPosition + Menus[Counter].Width;
_root.AttachMovie("Menu", "Menu" add Counter, 100 + Counter);
eval("Menu" add Counter).Name = Menus[Counter].Name
eval("Menu" add Counter)._x = XPosition;
eval("Menu" add Counter)._y = 10;
}
}