Skip navigation
Currently Being Moderated

ScrollPane - Changing various colors and appearance

Feb 28, 2013 5:33 AM

Tags: #actionscript #2 #scrollpane

I am trying to change the color layout of my ScrollPane boxes.  My website (removed) has a clean, white background.  The default white and light grey color of the standard ScrollPane scheme blends in too much.  I would like to change the color of the vertical scrollbar so that it stands out more.  Also, maybe have the background of the text box a light blue hue with black lettering to give it some "pop" also.


I am running Flash CS5 in AS 2.  I have read on another website to do the following in ActionScript:

  1. ScrollPane.setStyle("themeColor", "haloOrange")
  2. ScrollPane.setStyle("borderStyle", "none")
  3. ScrollPane.setStyle("scrollTrackColor", 0CC333)
  4. ScrollPane.setStyle("symbolColor", FF00FF)
  5. ScrollPane.setStyle("symbolDisabledColor", FFFF00)


This did not work.

Look at the bottom of the website for "Terms - Credits - Policies".  On this page there are three scrollPanes.  This is where I want to create these colorful ScrollPanes.  Please help.  If you want me to send you screenshots, I can do that, but looking at the live website might be all you need.  By the way, I am a novice in ActionScripting.  Thanks.  djm

  • Currently Being Moderated
    Feb 28, 2013 5:34 AM   in reply to dj.michaud

    You can edit the component manually to change the colors of it svarious elements.  Just doubleclick it in the library and edit any of the graphic elements you wish to.

    Mark as:
  • Currently Being Moderated
    Feb 28, 2013 6:47 AM   in reply to dj.michaud

    Sorry, I missed your mention of using AS2 earlier... AS3 alows you to physically modify the component in the manner I mentioned, editing it like you would any symbol.


    Chances are you are going to have to try to owrk your way down to the style elements that can be modified for the scrollpane, which might need to be further broken down to target the subcomponents, like the scrollbar.


    You mentioned a textbox and font color.... scrollpanes are not textfields, so I don't know what that is referring to.  If you want to change the background color of the scrollpane, in AS2 you can use...


        sp.setStyle("backgroundColor", "0XEEEEFF");

    Mark as:
  • Currently Being Moderated
    Feb 28, 2013 9:35 AM   in reply to dj.michaud

    You are getting that error because you are attaching it to the object.  Copy/cut the code from where you have it and click anywhere off of any objects and paste the code into the Actions window so that it gets planted in the timeline where the scrollpane is (preferably on a separate layer for actionscript).


    Note that "sp" is just what I was using as an instance name representation.  You need to assign such a name to your scrollpane and use it.  You can assign "sp" as an instance name if you like, though if you have more than one you will need to assign the code for each individually where each will need to have a unique instance name.

    Mark as:
  • Currently Being Moderated
    Feb 28, 2013 12:32 PM   in reply to dj.michaud

    Get rid of the "on..." code . that stuff is for when you place code on objects like you were doing (a bad practice)  You only need to use the code inside....


                     Terms.setStyle("backgroundColor", "0xFF0000");

                     Terms.setStyle("themeColor", "haloOrange");

                     Terms.setStyle("borderStyle", "inset");

                     Terms.setStyle("scrollTrackColor", "0x0CC333");

                     Terms.setStyle("symbolColor", "0xFF00FF");

                     Terms.setStyle("symbolDisabledColor", "0xFFFF00");


    The word "Terms" in the code that you show needs to be the instance name you assign to the Scrollpane that you place on the stage.  You assign the instance name by selecting that one scrollpane and entering that name in the Properties panel where it says <Instance Name>


    If you have more scrollpanes, they will each need their own unique names and their own lines of code like the above, just using their names.

    Mark as:
  • Currently Being Moderated
    Mar 1, 2013 8:10 AM   in reply to dj.michaud
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points