PDA

View Full Version : SCROLLBAR: Arrows work just fine, but not actual scroll bar!


swingheim
10-13-2005, 10:08 PM
I have a component scrollbar, and have it bound to a textfield. It works just fine ... except that I cannot get click-n-drag to work on the actual scroll bar! Has anyone else had this problem?

Here is my code:

myStyle = new TextField.StyleSheet();
myStyle.load("page.css");

_root.createTextField("myTextField", _root.getNextHighestDepth(), 0, 0, 620, 480);

myTextField.multiline = true;
myTextField.wordWrap = true;
myTextField.html = true;
myTextField.styleSheet = myStyle;
myTextField.background = true;
myTextField.backgroundColor = "0xe6e6e6";

SBinit={_targetInstanceName:'myTextField',horizont al:false};
_root.attachMovie('FScrollBarSymbol','myScrollBar' ,_root.getNextHighestDepth(),SBinit);

thisText = new LoadVars();
thisText.load("Welcome.txt");
thisText.onLoad = function(success) {
if (success) {
_root.myTextField.condenseWhite = true;
_root.myTextField.selectable = false;
_root.myTextField.text = thisText.myText;
} else {
trace("Failed to load: " + page_name);
}
};

The welcome.txt file:

&myText=<span class="title">Welcome!</span><br>
<br>
<span class="text">The ScrollBar component in the Flash authoring environment provides drag-and-drop functionality for adding scroll bars to dynamic and input text fields in Flash documents; it also provides a user interface for setting basic parameters. The methods of the FScrollBar component allow you to control scroll bars at runtime: you can create scroll bars, control scroll bars created in authoring, set or override basic parameters, and set additional runtime options. You do not need to use a constructor to access the methods of components. Some of the methods of the FScrollBar component are not recommended for use with scroll bars attached to text fields. See individual method entries for details.<br>
<br>
Advanced users and programmers can use the ScrollBar component with other Flash elements to create custom user interfaces.<br>
<br>
Component methods do not perform error checking for type, as do other native ActionScript objects and actions; therefore, it is recommended that you validate parameters before passing them to methods.<br>
<br>
The ScrollBar component is supported by Flash Player 6 and later versions of the Flash Player.<br>
<br>
For information on using the ScrollBar component, setting parameters during authoring, and changing the color and appearance of components, see "Customizing component colors and text"and "Customizing component skins" in the "Using Components" chapter in Using Flash.<br>
<br>
</span>
<br>
<span class="text">The ScrollBar component in the Flash authoring environment provides drag-and-drop functionality for adding scroll bars to dynamic and input text fields in Flash documents; it also provides a user interface for setting basic parameters. The methods of the FScrollBar component allow you to control scroll bars at runtime: you can create scroll bars, control scroll bars created in authoring, set or override basic parameters, and set additional runtime options. You do not need to use a constructor to access the methods of components. Some of the methods of the FScrollBar component are not recommended for use with scroll bars attached to text fields. See individual method entries for details.<br>
<br>
Advanced users and programmers can use the ScrollBar component with other Flash elements to create custom user interfaces.<br>
<br>
Component methods do not perform error checking for type, as do other native ActionScript objects and actions; therefore, it is recommended that you validate parameters before passing them to methods.<br>
<br>
The ScrollBar component is supported by Flash Player 6 and later versions of the Flash Player.<br>
<br>
For information on using the ScrollBar component, setting parameters during authoring, and changing the color and appearance of components, see "Customizing component colors and text"and "Customizing component skins" in the "Using Components" chapter in Using Flash.<br>
<br>
</span>



Please help.