|
Simple Scrollers for Flash Textboxes |
|
|
|
|
Written by aris
|
|
Saturday, 03 January 2009 |
- In Flash, textboxes are of 3 types namely - Static, Dynamic & Input. The size of Dynamic/Input text varies depending on the source file/user input and hence may require the use of scrollers.
- Create a Dynamic textbox with Multiline property selected using the Properties panel, name the variable and the instance as 'addr' and 'scrtxt' respectively.
- Create 2 buttons for Upward and Downward scrolling and write the following Actionscript code:
Upward Button on(press) { scrtxt.scroll=scrtxt.scroll-1; } Downward Button on(press) { scrtxt.scroll=scrtxt.scroll+1; } - Save your work and test the Movie (Ctrl + Enter). That's it you have learnt how to create simple scrollers for textboxes in Flash using Actionscript.
|