0 Replies Latest reply on May 12, 2016 7:25 AM by hendrixb29468710

    Animate CC HTML5 Canvas - Add vertical scrollbars to a dynamic text field


      Hi guys,


      I was wondering if someone could help out a noob.


      In an old Flash project I was able to use the UI scrollbar component whilst linking it up to a dynamic text box which was being populated by external text files. (Whenever a button was clicked, the relevant text file was shown).


      I'm now transitioning over to the HTML5 canvas and have read in other posts that the scrollbar component is no longer available.


      I was able to find some code which allows me to pull in external text files and have adapted it for my project (this works perfectly btw):


      setHelpFile = function() {

        var req = new XMLHttpRequest(); 

        req.open("GET", helpFile, true); 

        req.addEventListener("load", transferComplete); 



        function transferComplete(e) { 

        var rawXML = e.target.response;

        screen.help.txt.text = rawXML;






      I've masked the dynamic text field and created a scrollbar symbol. Now I'm trying to work out how to get this to work whenever the text is too long for my text field.


      Bearing in mind I'm a complete coding noob can anyone please advice or point me to some bit of code?


      Many thanks!