Thursday, 17 April 2008

Remove border from Scrollpane in Flash

This flash tutorial will teach you how to remove the black border around the flash scroll pane component. The border around the scroll pane can be unpleasant to the eye. However, it only takes one simple line of code to remove the border from the scroll pane.


Remove border from scrollpane in Flash

Assuming you already have the scroll pane component on the stage and given it an instance name. Add the following code:

myinstancename.setStyle("borderStyle", "none");


This code removes the border from the scroll pane, by setting the border style to none. If you still have no idea how to remove the border. Follow the simple steps below:

Step 1

Open a new flash document.
Add the scroll pane component to the stage. Go to windows > components > user interface and drag the scrollpane on to the stage.

Step 2

Select the scroll pane component and give it and instance name. eg. mypane.



Step 3

On the timeline, right click on the first frame of the layer one and select actions.



Step 4

Add the following code:

mypane.setStyle("borderStyle","none");


You should now have a borderless scrollpane.




1 comments:

alize said...

Omg, thank you so much!!! I've been looking and LOOKING on how to get rid of the border on the ScrollPane and none of them worked.

However, your ActionScript worked and so I'm really happy, thank you so very much -- you just saved me so much time, now I can finish my assignment!

Once again,
THANK YOU VERY MUCH!!!

The VSEA

What next ?

Subscribe to Flash Tutorials

Add to Technorati Favorites

Follow my Twitter