Animator CC 2017 - Scrollable Text Box Error 1120
Hello. I'm working on a scrolling textbox that I can import into another project as a SWF file. However, upon exporting the file I get a series of Error 1120 messages. The code that I'm using, I found on another forum post for a scrolling text box here (credit to kglad). I then, edited a few things out for my purposes. The actionscript code works perfectly when I use the Test function, but after that it all becomes a hodge podge mess. My two varieties of error messages and my code are pasted below:
Scene 1, Layer 'Layer 3' Line 1, Column 1 | 1120: Access of undefined property tl.
Scene 1, Layer 'Layer 3' Line 3, Column 1 | 1120: Access of undefined property createjs.
tl = this;
createjs.Touch.enable(tl);
paramF(0, 48, 146 - 20, 48 + 146 - tl.tf.getBounds().height);
tl.sb.thumb.addEventListener('mousedown', startdragF);
function startdragF(e) {
stage.addEventListener('stagemousemove', dragF);
stage.addEventListener('stagemouseup', stopdragF);
}
function stopdragF(e) {
stage.removeEventListener('stagemousemove', dragF);
}
function dragF(e) {
if (e.stageY >= 48 && e.stageY <= 48 + 146 - 20) {
tl.sb.thumb.y = Math.floor(e.stageY - tl.sb.y);
tl.tf.y = Math.floor(tl.m * tl.sb.thumb.y + tl.b);
}
}
function paramF(x1, y1, x2, y2) {
tl.m = (y1 - y2) / (x1 - x2);
tl.b = y1 - tl.m * x1;
}
Any help or suggestions as to fix this code would be greatly appreciated. I'm not super skilled with code, but will do my best.
Thanks!
