/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var scr = new AS3Scrollbar(); addChildAt(scr,0); var maskBox:MovieClip = new MovieClip(); maskBox.width = 200; maskBox.height = 200; maskBox.x = 0; maskBox.y = 0; addChild(maskBox); var myTextField:TextField = new TextField(); myTextField.width = 200; myTextField.autoSize = TextFieldAutoSize.LEFT; myTextField.wordWrap = true; myTextField.text = "The quick brown fox jumped over the lazy dog. TThe quick brown fox jumped over the lazy dog. TThe quick brown fox jumped over the lazy dog. TThe quick brown fox jumped over the lazy dog. TThe quick brown fox jumped over the lazy dog. TThe quick brown fox jumped over the lazy dog. TThe quick brown fox jumped over the lazy dog. TThe quick brown fox jumped over the lazy dog. TThe quick brown fox jumped over the lazy dog. TThe quick brown fox jumped over the lazy dog. TThe quick brown fox jumped over the lazy dog. TThe quick brown fox jumped over the lazy dog. TThe quick brown fox jumped over the lazy dog. TThe quick brown fox jumped over the lazy dog. TThe quick brown fox jumped over the lazy dog. TThe quick brown fox jumped over the lazy dog. TThe quick brown fox jumped over the lazy dog. TThe quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog."; var textGroup:MovieClip = new MovieClip(); textGroup.addChild(myTextField); addChild(textGroup); scr.id = 1; scr.x = 317; scr.y = 0; scr.height = 200; scr.activeColor = 0x666666; scr.inactiveColor = 0xFFFFFF; scr.trackColor = 0xCCCCCC; scr.autohide = false; scr.hideOnStart = false; scr.allowScrollButtons = true; scr.blurring = true; scr.ease = "easenone"; scr.scrolltime = 0.25; scr.content = textGroup; scr.__mask = maskBox; scr.init();