ScrollPane DOES Support Styles

Docs say it doesn’t, but it does. Here’s my fav; a borderless one!!!

– drag a ScrollPane on stage
– select it and delete it (so it’s in your library)
– draw something big
– select it
– make it a movie clip
– delete it from the stage
– give it a linkage name of “test”
– make a new layer
– put this code on it

attachMovie("ScrollPane", "mc", 0);
mc.setSize(100, 100);
mc.contentPath = "test";

function onKeyDown()
{
        switch(Key.getCode()){
                case Key.LEFT:
                mc.setStyle("borderStyle", "none");
                break;
                
                case Key.UP:
                mc.setStyle("borderStyle", "inset");
                break;
                
                case Key.RIGHT:
                mc.setStyle("borderStyle", "outset");
                break;
                
                case Key.DOWN:
                mc.setStyle("borderStyle", "solid");
                
                break;
        }
}

Key.addListener(this);

– test movie
– pressing “left” arrow key is my favorite; borderless

Funny thing, if you scroll your content to the middle, and then keep pressing down and left, down and left, etc., the content will move slightly. A bug, but no one would really care.

2 Replies to “ScrollPane DOES Support Styles”

  1. well, dosent work on flash 8.. but how do I style a scrollpane? Script says yes but my eyes says no.. It dosent show any diffrence from orginal style.. I used every action possible.. both in flash 8, cs3 and cs4 so is this some kind of bug?

Comments are closed.