• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Force/override slider component thumb size

Community Beginner ,
Sep 02, 2008 Sep 02, 2008

Copy link to clipboard

Copied

I am attempting to reskin the AS3 Slider component to have a relatively "tall" draggable thumb graphic. However, the slider thumb always seems to be forcibly scaled down to 13x13 regardless of the size of the graphic. I'm currently using the drag-and-drop component on workspace method, and double-clicked the livepreview to change the skin pieces.

I've tried resizing the contents of the SliderThumb_*Skin (upSkin, downSkin, ...) symbols, the Slider component itself on the stage, and even the placeholders on the double-click skin organizer sheet. The height of the thumb object is not directly accessible (seems to be private). The translated position of the 13x13 thumb relative to the symbol center is preserved correctly... but the size seems to be stuck at 13x13.

Is there a workaround for this? I've searched and found a few Flex solutions having to do with overriding a measure() method or extending the class to hard-code a different height, but none of the corresponding classes (e.g. one site recommended extending mx.controls.sliderClasses.SliderThumb) seem to be accessible within the Flash AS3 implementation of the components.
TOPICS
ActionScript

Views

2.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

New Here , Sep 04, 2008 Sep 04, 2008
Hi Ross,

I had the same problem...it's a shame this isn't more easy to change. This is how I did it:

Sprite(mySlider.getChildAt(1)).height=Sprite(mySlider.getChildAt(1)).width=26;

While you're there, I find that this one is helpful too:

Sprite(mySlider.getChildAt(1)).useHandCursor = true;

HTH,

MicroAngelo

PS How weak are these forum editors? Come on Adobe! Code Paste Bins are a minimum requirement, and where's the UI testing?

Votes

Translate

Translate
New Here ,
Sep 04, 2008 Sep 04, 2008

Copy link to clipboard

Copied

Hi Ross,

I had the same problem...it's a shame this isn't more easy to change. This is how I did it:

Sprite(mySlider.getChildAt(1)).height=Sprite(mySlider.getChildAt(1)).width=26;

While you're there, I find that this one is helpful too:

Sprite(mySlider.getChildAt(1)).useHandCursor = true;

HTH,

MicroAngelo

PS How weak are these forum editors? Come on Adobe! Code Paste Bins are a minimum requirement, and where's the UI testing?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 04, 2008 Sep 04, 2008

Copy link to clipboard

Copied

Yep, that did it. The hand cursor helped a good deal too, it makes the controls more clearly interactable.

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 03, 2013 Feb 03, 2013

Copy link to clipboard

Copied

Very helpful to me as well 5 years later!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 15, 2013 Feb 15, 2013

Copy link to clipboard

Copied

LATEST

Me too!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines