Here’s my code: I’ve truncated all the unnecessary functions and variables.
package {
import ... ;
public class DocumentClass extends MovieClip {
//
// Containers
//
private var interactiveContainer:MovieClip = new MovieClip(); // container for all buttons
public function DocumentClass() {
...
}
//
// showing the content of selected object
//
private function updateComment(comment:String):void {
trace(comment); //trace perfectly what I need, on the output
//interactiveContainer.alpha = .20; //works in targeting the whole container
//FAILS I need comm, which is inside interactiveContainer, that has a textbox labeled desc to say what comment says
interactiveContainer.comm.desc.text = comment;
}
//
// Adds a comment to bottom of the screen
//
private function addComment():void {
var comm:commentMc=new commentMc();// constructs a new plant
interactiveContainer.addChild(comm);// adds the plant
//addChild(comment);
comm.x=20;
comm.y=470;
comm.desc.text = "";
}
//
// Mouse over obj
//
function onFishOver(event:MouseEvent):void{
event.target.setSpeed(0);
event.target.fishIMG.alpha = 1;
//var mc:MovieClip;
//mc = event.target.parent;
//trace(fishHolder.numChildren);
//trace(event.target.name);
fishHolder.setChildIndex (fishHolder.getChildByName(event.target.name), (fishHolder.numChildren - 1));
//Code that is being problematic.
updateComment(event.target.getFishDesc());
//event.target.frameState(2);
//trace(fishContainer.getChildAt(1));
}
}
}
My artistic attempt to resemble what I’m trying to achieve…

How do I address the desc.txt portion to update itself (which is inside the interactiveContainer) according to what the “fish” object holds after moving it right on top of it?
Thanks,
kpxnamja