Flash Components      Flash Menu      Flash Gallery      Flash Slideshow      FLV Player      Flash Form      MP3 Player      PhotoFlow      Flash CMS      3D Wall      Flash Scroller

Flash / AS

Silverlight

WPF

ASP.net / PHP

Photoshop

Forums

Blog

About

 


FlashComponents
  Galleries
  Slideshows
  Menus
  Design & Effects
  Audio & Video
  User Interface
  Templates

 

 

 

 

 
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

 


kirupa.com's fast and reliable hosting provided by Media Temple. flash components
The Text Animation Component for Flash CS3
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.
Check out our high quality vector-based design packs! Flash Effect Components

Flash Templates
CSS Templates
Dreamweaver Templates

flash menus, buttons and components
Digicrafts Components The best flash components ever!
Entheos Flash Website Templates Buy and sell FLAs at Ultrashock!
Upload, publish, deliver. Secure hosting for your professional or academic video, presentations & more. Screencast.com Purchase & Download Flash Components
Learn how to advertise on kirupa.com