The Blog

Simple scroller for flash textboxes

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.

Related posts:

  1. Run an external executable file (.exe) from your flash
  2. How to get a button to stay down in Flash, AS2
  3. Close flash window button
  4. Creating a simple content slider (AS2 )
  5. Flash zoom in movie clip and re-scale
rabbit vibrator

Leave a Comment

Let me know your thoughts on this post but remember to place nicely folks!