billy nugz
06-22-2008, 02:06 AM
Is there a easier way to get back to the main time line for a nested clip?
I have to call to a flex api fuction form a loaded swf thats in a scroll bar (I know.. but thats the way it is) I have to always do a name trace to see where I am and then once I get to the root it wont cal the function? Is there a easy way to do this?
Here is what im doing wrong
clip1.addEventListener(MouseEvent.MOUSE_UP,clip1Cl ick);
function clip1Click(event:MouseEvent):void {
//trace("click");
trace(event.target.parent.parent.parent.parent.par ent.parent.parent.parent.parent.parent.parent.name );
trace(event.target.parent.parent.tip1.text);
trace(event.target.parent.parent.title.text);
event.target.parent.parent.parent.parent.parent.pa rent.parent.parent.parent.parent.parent.AddClippin g("event.target.parent.parent.title.text",event.target.parent.parent.tip1.text,"");
}
those children arnt lonely with all those parents and flash seems to be giveing instance names on the fly to some clips like instance_284 and stuff. WTF ?
Any help would be cool :confused:
I have to call to a flex api fuction form a loaded swf thats in a scroll bar (I know.. but thats the way it is) I have to always do a name trace to see where I am and then once I get to the root it wont cal the function? Is there a easy way to do this?
Here is what im doing wrong
clip1.addEventListener(MouseEvent.MOUSE_UP,clip1Cl ick);
function clip1Click(event:MouseEvent):void {
//trace("click");
trace(event.target.parent.parent.parent.parent.par ent.parent.parent.parent.parent.parent.parent.name );
trace(event.target.parent.parent.tip1.text);
trace(event.target.parent.parent.title.text);
event.target.parent.parent.parent.parent.parent.pa rent.parent.parent.parent.parent.parent.AddClippin g("event.target.parent.parent.title.text",event.target.parent.parent.tip1.text,"");
}
those children arnt lonely with all those parents and flash seems to be giveing instance names on the fly to some clips like instance_284 and stuff. WTF ?
Any help would be cool :confused: