Copy link to clipboard
Copied
I have a function that is to populate a movie clip with the values of variables.
this.pd_PTSVBBEVA=function(){
// This all works fine:
exportRoot.PTSVBBEVA.pDisplay.pName.text = t_PTSVBBEVA;
exportRoot.PTSVBBEVA.pDisplay.pDesc.text = c_PTSVBBEVA;
PP_URL = u_PTSVBBEVA;
// this bit does not:
var pPic = new createjs.Bitmap(p_PTSVBBEVA);
exportRoot.PTSVBBEVA.PDisplay.pic.addChild(pPic);
exportRoot.PTSVBBEVA.PDisplay.pic.scaleX = .2; exportRoot.PTSVBBEVA.PDisplay.pic.scaleY = .2;
}
The error produced: Uncaught TypeError: Cannot read properties of undefined (reading 'pic')
'pic' is certainly there in my MC, it is an empty MC:
Looks like it should work, I have a similar function that populates another type of MC in other applications that displays the image just fine, what might I be missing here?
Thanks!
Hi.
Inside the function you have exportRoot.PTSVBBEVA.pDisplay and outside of it you have exportRoot.PTSVBBEVA.PDisplay. So I guess you need to correct the case for pDisplay or PDisplay.
Regards,
JC
Copy link to clipboard
Copied
Hi.
Inside the function you have exportRoot.PTSVBBEVA.pDisplay and outside of it you have exportRoot.PTSVBBEVA.PDisplay. So I guess you need to correct the case for pDisplay or PDisplay.
Regards,
JC
Copy link to clipboard
Copied
You're absolutely correct, I made a rookie mistake... how emberassing! Thank you!
Copy link to clipboard
Copied
Great!
No problem at all!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now