topical media & game development
actionscript-events-ScrollBarDemo.ax
actionscript-events-ScrollBarDemo.ax
[swf]
flex
package {
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.utils.*;
// Demonstrates the use of the ScrollBar class
public class @ax-actionscript-events-ScrollBarDemo extends Sprite {
public function @ax-actionscript-events-ScrollBarDemo () {
// Create a TextField
var inputfield:TextField = new TextField();
// Seed the text field with some initial content
inputfield.text = "1\n2\n3\n4\n5\n6\n7\n8\n9";
inputfield.height = 50;
inputfield.width = 100;
inputfield.border = true;
inputfield.background = true;
inputfield.type = TextFieldType.INPUT;
inputfield.multiline = true;
addChild(inputfield);
// Create a scrollbar, and associate it with the TextField
var scrollbar:actionscript_events_ScrollBar = new actionscript_events_ScrollBar(inputfield);
addChild(scrollbar);
}
}
}
(C) Æliens
27/08/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.