So, I'm back with more problems with my Flash App.
I have a list of several movie clips in sucession, that are "MiniInfos", containing some details about some "works". These are added to the stage in a cycle, and each time I need to add a eventlistener(MouseEvent.CLICK) to be able to click it to show more details. The problem, to know which details should come up next, I need to acess a TextField that contains the ID to be able to pass it to the next Movieclip (lets call it "BigInfo").
So, I know it sounds confusing, but ill try to summarize.
There are several MiniInfos added to the stage with TextFields like "ID: 1, ID: 2, ID: 3", etc.
I want to be able to click one and another movieclip (BigInfo) gets added to the stage with more details about it. To know which info I should pull up on the PHP, I need to know the ID from which MiniInfo I clicked.
My ideia (which didn't work) was:
//on the cycle
MiniInfo.addEventListener(MouseEvent.CLICK, OpenWorkDetails);
//further down the code
public function OpenWorkDetails(e:MouseEvent):void
{
trace(MiniInfo.IDTrabalhoField.text);
//If I figure this number out, I will change it to addChild
}
So, I get an error 1120: Access of undefined property MiniInfo.
I realize this code isnt exactly the best, so If you guys got a diferent solution in mind, feel free to share. Im still learning flash.
Thank you.
Marco Fox.