Hi,
You can set styles "globally" for components, and/or you can skin a
component in your library:
Assuming this is AS2, the way I did the scrollbar skinning was to
make a library swf, put the components to be skinned in there and skin
them using the usual method, export for sharing and make sure you load
in the library swf to your main file... If you just want to skin a
scrollbar in your main SWF you can do this too - you will need to put
one on the stage somewhere.
You can change some of the scrollbar params with ActionScript &
global styles - look in the Components reference in the help.
My project had separate SWF's for each page, with text fields on. I
found I could not attach the scrollbar at design time, so here is what I
did to get around the problem:
//mpadText is a text field put on stage at design-time
if(mpadText) {
var init = {_targetInstanceName:"mpadText",horizontal:false};
attachMovie("UIScrollBar","mScrollBar",2,init);
mScrollBar._x= this.mpadText._x + this.mpadText._width;
mScrollBar._y= this.mpadText._y;
}
HTH
Glen
Lehr, Theodore M (N-SGIS) wrote:
OK, so I am using:
createClassObject(mx.controls.TextArea, "textArea", 0, {editable:false,
html:true, wordWrap:true, vScrollPolicy:"auto"});
textArea.setSize(250, 225);
textArea.move(25, 50);
textArea.text = "<b>Content 1</b><br><br>Lorem ipsum dolor sit amet,
Integer vitae quam. Aliquam vestibulum. Curabitur nibh eros, tincidunt
eu, imperdiet non, pulvinar vel, pede. Cras scelerisque, neque non
fermentum suscipit, nulla nisl varius risus, <br><br>Lorem ipsum dolor
sit amet, Integer vitae quam. Aliquam vestibulum. Curabitur nibh eros,
tincidunt eu, imperdiet non, pulvinar vel, pede. Cras scelerisque, neque
non fermentum suscipit, nulla nisl varius risus, <br><br>Lorem ipsum
dolor sit amet, Integer vitae quam. Aliquam vestibulum. Curabitur nibh
eros, tincidunt eu, imperdiet non, pulvinar vel, pede. Cras scelerisque,
neque non fermentum suscipit, nulla nisl varius risus, <br><br>Lorem
ipsum dolor sit amet, Integer vitae quam. Aliquam vestibulum. Curabitur
nibh eros, tincidunt eu, imperdiet non, pulvinar vel, pede. Cras
scelerisque, neque non fermentum suscipit, nulla nisl varius risus, ";
to create a textarea and scroll when necessary... I am able to style the
textarea the way I want to with:
textArea.setStyle("backgroundColor",0xcccccc);
How do I reach the UIScrollBar to set the style?
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
--
Glen Pike
01326 218440
www.glenpike.co.uk <http://www.glenpike.co.uk/>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders