Wednesday, July 4, 2012

[Action Script] Scroll Pane custom skin July,2012

Hi Guys,

I've used a scroll pane to display a movie clip, and used custom skinning to change the look of the scroll pane,

the instance name of my scroll pane is sp,

sp.source = growth_mc;
sp.update();
sp.scrollDrag = false;
empty_mc = new MovieClip();

var emptytemp_mc:MovieClip = new MovieClip();
sp.setStyle("disabledSkin",emptytemp_mc);
sp.setStyle("upSkin",emptytemp_mc);
sp.setStyle("downArrowDisabledSkin",emptytemp_mc);
sp.setStyle("downArrowDownSkin",emptytemp_mc);
sp.setStyle("downArrowOverSkin",emptytemp_mc);
sp.setStyle("downArrowUpSkin",emptytemp_mc);
sp.setStyle("upArrowDisabledSkin",emptytemp_mc);
sp.setStyle("upArrowDownSkin",emptytemp_mc);
sp.setStyle("upArrowOverSkin",emptytemp_mc);
sp.setStyle("upArrowUpSkin",emptytemp_mc);
sp.setStyle("thumbIcon",emptytemp_mc);

var tempscrollthumb:scrollthumb_mc = new scrollthumb_mc();
sp.setStyle("thumbDownSkin",tempscrollthumb);
sp.setStyle("thumbOverSkin",tempscrollthumb);
sp.setStyle("thumbUpSkin",tempscrollthumb);

var tempscrolllong_mc:scrolllong_mc = new scrolllong_mc();
sp.setStyle("trackDownSkin",tempscrolllong_mc);
sp.setStyle("trackOverSkin",tempscrolllong_mc);
sp.setStyle("trackUpSkin",tempscrolllong_mc);

whats happening is that only the horizontal scroll bar shows the custom skin,
the vertical scroll bar does not reflect the custom skin, moreover the vertical scroll is not seen at all.

I can't find a solution to this, please help.
Scroll Pane custom skin

Related Post



0 comments: