Working on an RPG type flash, and I have to be able to control a text-box from quite a few locations. The one that is causing me trouble is the inventory. I need to be able to access the textbox with an instance of "statusWindow" from within the inventory clip (instance name "inventory"), so when I mouse over an item within the movieclip it will change the status window on the stage.
In this instance I want to mouse over inventory.invHealth from the main timeline to get the display. itemName and itemProps are strings containing information about the item.
I tried the following but it gave me a "possibly undefined" error.
invHealth.addEventListener(MouseEvent.MOUSE_OVER, itemStats);
function itemStats(e:Event):void
{
root.statusWindow.text = itemName+"\n"+itemProps;
}
I'm not very adept in AS3 just yet, so if you could also explain your code when you post it -though most people usually do anyway- I would very much appreciate it. Thanks in advance!