Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9026827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T06:36:56+00:00 2026-06-16T06:36:56+00:00

Using Flash CS5 I came across something odd today. The UIScrollBar component has the

  • 0

Using Flash CS5 I came across something odd today.

The UIScrollBar component has the rigid width of 15px. When you add it to a container such as a Sprite, you’d expect the width of the sprite to return 15, but it returns 100 instead!

Here’s an example code.

import flash.display.Sprite;
import fl.controls.UIScrollBar;

var spr:Sprite = new Sprite();
addChild(spr);
trace('spr.width:',spr.width);

var bar:UIScrollBar = new UIScrollBar();
spr.addChild(bar);
trace('bar.width',bar.width);
trace('spr.width:',spr.width);

Interestingly, output is

spr.width: 0
bar.width 15
spr.width: 100

Does anybody know what’s happening there? Is this a bug?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T06:36:57+00:00Added an answer on June 16, 2026 at 6:36 am

    Found out that it’s kind of a bug. What happens is, it takes some time for it to draw/render the component on the stage so its size becomes accessible only after it’s drawn. For the record, in my computer it takes 1 ms. until it returns the expected value.

    Another surprising issue is, UIScrollBar returns 15px as its width whereas the container sprite returns 16px. For those looking for the reason, it’s probably related to the outline of the bar, which is drawn with thickness=1 and scaleMode=LineScaleMode.NONE. I had the exact same issue with a class I wrote, in which I had to override the width and height getters by adding 1 to the return values of each super method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I am using Flash CS5 and Photoshop CS3 . The issue I am
So I've made a 3D animation in flash cs5.5 using ( AS3 and flashPlayer
I am using flash to read contents from a UTF8 page, which has unicode
I've been looking into developing applications for iOS using Flash CS5.5, however I'm having
I'm using Adobe Flash CS5 with Adobe Air 2.5 to build an air app.
How to compile your flex (Flash Builder) application for Iph*ne Using Adobe Flash CS5?
I am very new to Action Script. I am using Flash Professional CS5 with
I'm using AMFPHP 1.9, ActionScript 3 and Adobe Flash Pro CS5 with Flash player
My team and I are considering switching to using the Flash CS5 Uncompressed Document
by using flash cs5 with a huge internal image library (over 300+ small png-files)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.