Dynamic text And Scrollbar


/ Published in: ActionScript 3
Save to your folder(s)

If your using dynamic text and AS3's built in scroll bar. Sometimes it won't activate, ie. no scrollbar. You must update the scrollbar after the text has been loaded. Sometimes you only want the scrollbar to show up when needed and hide when not.


Copy this code and paste it in your HTML
  1. //mytext_scroll is the name of the scrollbar I'm using
  2.  
  3. mytext_scroll.update();
  4. //---------------------------------------------------------
  5. //---------------------------------------------------------
  6.  
  7. mytext_scroll.update(); //You must update first
  8.  
  9. if (mytext_scroll.enabled == false) //Then check to see if needed
  10. {
  11. mytext_scroll.visible = false;
  12. }else{
  13. mytext_scroll.visible = true;
  14. };

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.