Hi Animate, I'm trying to call a library movie clip with code that worked for identical clips but gives the error "lib.bellSideWht is not a constuctor" for the new one I just added. As far as I can see, the code for the existing library item (which works) is identical to the code for the new library item which doesn't work. The code below shows code for both clips -- the one on the top works (starSideRt_01), the one on the bottom doesn't (bellSideWht_01). Any help will be appreciated. //this is the code on the button which is nested
this.starSideRt_01_btn.addEventListener("click", getStarSideRt.bind(this));
this.starSideRt_02_btn.addEventListener("click", getStarSideRt.bind(this));
this.starSideRt_03_btn.addEventListener("click", getStarSideRt.bind(this));
function getStarSideRt()
{
exportRoot.positionStarSideRt();
}
this.bellSideWht_01_btn.addEventListener("click", getBellSideWht.bind(this));
this.bellSideWht_02_btn.addEventListener("click", getBellSideWht.bind(this));
this.bellSideWht_03_btn.addEventListener("click", getBellSideWht.bind(this));
function getBellSideWht()
{
exportRoot.positionBellSideWht();
} //this is the code on the main timeline
this.positionStarSideRt = function()
{
const starSideRt_mc = new lib.starSideRt();
this.addChild(starSideRt_mc);
starSideRt_mc.x = 200;
starSideRt_mc.y = 200;
starSideRt_mc.scale *= 0.45;
starSideRt_mc.addEventListener("pressmove", moveSomeFlower.bind(this));
starSideRt_mc.addEventListener("click", clickSomeFlower);
}
this.positionBellSideWht = function()
{
console.log("hello");
const bellSideWht_mc = new lib.bellSideWht();
//this.addChild(bellSideWht_mc);
//bellSideWht_mc.x = 200;
//bellSideWht_mc.y = 200;
//bellSideWht_mc.scale *= 0.45;
//bellSideWht_mc.addEventListener("pressmove", moveSomeFlower.bind(this));
//bellSideWht_mc.addEventListener("click", clickSomeFlower);
}
... View more