Copy link to clipboard
Copied
I have a graphic symbol which contains a nested button. When clicked, I want that button to move the parent graphic symbol to a location X Y.
This is not working, though the nested button gets it's pointer cursor.
this.closeLens.addEventListener("click", closeThisLens.bind(this));
function closeThisLens()
{
this.parent.x = -200;
this.parent.y = -850;
}
1 Correct answer
Hi.
Is the code located inside of the Graphic symbol? Because actions don't run on the timelines of Graphic symbols. You need to convert your Graphic to Movie Clip and replace this.parent in the code by this only because you want to move the Graphic instance itself and not its parent.
Regards,
JC
Copy link to clipboard
Copied
Hi.
Is the code located inside of the Graphic symbol? Because actions don't run on the timelines of Graphic symbols. You need to convert your Graphic to Movie Clip and replace this.parent in the code by this only because you want to move the Graphic instance itself and not its parent.
Regards,
JC
Copy link to clipboard
Copied
Thanks JC, that did the trick!
Peter
Copy link to clipboard
Copied
Awesome!
You're welcome!

