How can I addchild to a layer rather than the stage?
Im creating an animation where the user can click to add elements to the screen but the issue is whenever the user clicks the element is stuck relative to the stage not the background (the element moves with the stage) and Im not sure how to fix this
function fl_MouseClickHandler_4()
{
// Start your custom code
// This example code displays the words "Mouse clicked" in the Output panel.
var fl_MyInstance_4 = new lib.Cloud1();
this.addChild(fl_MyInstance_4);
fl_MyInstance_4.y = stage.mouseY;
fl_MyInstance_4.x = stage.mouseX;