Describe the bug
Referencing a text seems to work differently from referencing a clip.
To Reproduce
Steps to reproduce the bug, if you have them:
- Put a clip and a text on the stage (I put them together in a clip object)
- Give them some names (I called them “textDebug” and “menuContext”)
- In a Mouseclick eventandler of a second clip enter the following code:
var thisClip=this;
console.log(“thisClip.parent.menuContext:”+thisClip.parent.menuContext);
console.log(“menuContext:”+menuContext);
console.log(“thisClip.parent.textDebug:”+thisClip.parent.textDebug);
console.log(“textDebug:”+textDebug); - This will show up as result:
thisClip.parent.menuContext:[object Object]
menuContext:[object Object]
thisClip.parent.textDebug:undefined
textDebug:[object Object]
Expected behavior
“thisClip.parent.textDebug:undefined” should read: thisClip.parent.textDebug:[object Object]
since both text and clip are in the same scope (the stage of a clip)
Screenshots
none
Computer Information
- OS: Win10
- Device Type: Desktop
- Browser Chrome
- Wick version 1.19.3
In fact I have no idea how to refer to the text object now except by direct reference from the same scope like: “textDebug” instead of “thisClip.parent.textDebug” (which is a problem if you are not in the same scope and want to add some path to your reference (like when i’m in an event handler))
edit: Workaround: If I put the text inside of a clip object and use it like: [clipname].[textname].setText() it works fine. (so in this case if [clipName] is debugClip: thisClip.parent.debugClip.debugText.setText(“hello”);