NAVIGATION:

 

SUPPORTERS:

FlashComponents
  Flash Templates
  Flash Gallery
  Flash Slideshow
  Flash Menu
  Flash Design
  Flash Video
  User Interface

 

FOLLOW:

RSS it down! Twitter it up! Facebook it like a fiend!

 

 

 

 

 
Hide/View the Scrollbar Component
         by Aaron Noriega (aka norie)

Introduction
Whether it's an input or dynamic text box, many people dread the look of a disabled scrollbar. This tutorial will teach you how to apply a simple code to make the scrollbar invisible when it's not being used.

[ Type Enough Text to Make the Boxes Scroll ]

Steps to Create Animation
The following steps will help you to create the animation you see above:

  1. Create a new input box, name it textBox, and change the line type to Multiline.
     

[ example of an image ]

  1. Drag the scrollbar component onto the input box; give the scrollbar an instance name of scroll1 and make sure the target text field is textBox.
     

[ example of an image ]

  1. Now, it's time to make the second text box, but this time we're going to make it dynamic; with an instance name of textBox2 and the line type set to Multiline.
     

[ example of an image ]

  1. Repeat the process of adding a scrollbar. This time with an instance name of scroll2 and a target text field of textBox2
     

[ example of an image ]

  1. The last design step: make a button--similar to the one above, if you wish. And place it between the two text boxes.
     
  2. Now it's time to get our hands dirty with some Actionscript. Add the following code to frame 1 (there should only be one frame).
     

  1. The final step is to add the following AS to the button.
     


Code Explanation
 

_parent.textBox2.text = _parent.textBox.text;
Set the text in the bottom text box (textBox2) equal to the text in the top text box (textBox).

textBox.maxscroll
A numeric text box property, that indicates the max value of the property scroll. If this value is 1, the associated scrollbar is disabled. If maxscroll is greater than 1, the scrollbar is enabled.

textBox.onChanged
An action that is called whenever the associated text box is modified.

The scrollbar component has been excluded from MX 2004, but the scrollbar component can be taken from any MX fla that includes the component:

Download Source for MX

If you have any questions, please post them on the kirupaForum.

norie
http://www.rastardesigns.com

 

SUPPORTERS:

kirupa.com's fast and reliable hosting provided by Media Temple. flash components
Creative web apps. Make your own free flash banners and photo slideshows.
Check out the great, high-quality flash extensions. Buy or sell stock flash, video, audio and fonts for as little as 50 cents at FlashDen.

Flash Transition Effects

Flash Effect Tutorials

Digicrafts Components
Flash effects. Art without coding. Upload, publish, deliver. Secure hosting for your professional or academic video, presentations & more. Screencast.com
Streamsolutions Content Delivery Networks Flipping Book - page flip flash component.
Flash-Gallery.com - Get your flash photo gallery (flash component or swf gallery Learn how to advertise on kirupa.com
 

cdn
content delivery network (cdn)