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.

Photobucket


Step 2

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

Photobucket


Step 3

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

Photobucket


Step 4

Add the following code:

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

You should now have a borderless scrollpane. Feel free to contact me for any questions or comments.

6 comments:

alize 17 November 2008 at 03:38  

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

Himani 30 January 2009 at 21:23  

Hi,

Thanks so much for this actionscript. I was trying so many options to get rid of the border around ScrollPane, and finally your script worked for me.

Keep up the good work.

Himani

sivaprasad 27 November 2009 at 01:16  

Thanks for the post. it is working on the flash player 6. but not on 6+.

Can you plese tell me how to enable or edit border in flash cs3.

Thanks,

iliketo 2 December 2009 at 04:41  

@sivaprasad

There seems to be lack of scrollpane customisation documentation for AS3, but you can edit the scrollpane component by directly changing the theme. You need to right click on the scrollpane on the stage and select 'Edit'. Then search for the scrollpane border and change the alpha to 0%.

NĂ©meth 25 March 2010 at 04:44  

Thank you very much, its easy and working!

SANJIT PANDEY 19 April 2011 at 02:35  

Thanks u so much ........ its work :D

  COPYRIGHT © 2014 · ILIKE2FLASH · Theme by Ourblogtemplates

Back to TOP