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 816265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:48:13+00:00 2026-05-15T01:48:13+00:00

I’m trying to set the height of a vertical bar (activityBar) but it does

  • 0

I’m trying to set the height of a vertical bar (activityBar) but it does not appear to do anything. i have tried something similar with the whole component, but setting the dimensions does nothing (even in the mxml used to instantiate the class). Indeed, I’ve added transparent graphics just to give the component some dimensions

I’m not sure what I’m doing wrong. It’s something bad though; my approach seems dire.

FYI: I’m trying to create a mic activity bar that will respond to the mic by simply setting the height of the activityBar child (which seems to me to be more efficient than redrawing the graphics each time).

Thanks for your help!

package components {

  import mx.core.UIComponent;

  public class MicActivityBar extends UIComponent {        
    public var activityBar:UIComponent; 

    // Constructor

    public function MicActivityBar() {

        super();

        this.opaqueBackground = 0xcc4444;

        graphics.beginFill(0xcccccc, 0);

        graphics.drawRect(0,-15,5,30);

        graphics.endFill();// background for bar 

        activityBar = new UIComponent();
        activityBar.graphics.beginFill(0xcccccc, 0.8);
        activityBar.graphics.drawRect(0,-15,5,20);
        activityBar.graphics.endFill();
        activityBar.height=10;

        addChild(activityBar);

    }
  }
}
  • 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-05-15T01:48:14+00:00Added an answer on May 15, 2026 at 1:48 am
    package components {
    
      import mx.core.UIComponent;
    
      public class MicActivityBar extends UIComponent {        
        public var activityBar:UIComponent; 
    
        private var _w:Number;
    
    
        // Constructor
    
        public function MicActivityBar() {
    
            super();
    
            this.opaqueBackground = 0xcc4444;
    
            graphics.beginFill(0xcccccc, 0);
    
            graphics.drawRect(0,-15,5,30);
    
            graphics.endFill();// background for bar 
    
            activityBar = new UIComponent();
            activityBar.graphics.beginFill(0xcccccc, 0.8);
            activityBar.graphics.drawRect(0,-15,5,20);
            activityBar.graphics.endFill();
            activityBar.height=10;
    
            addChild(activityBar);
    
        }
    
        public function get w():Number {
        return _w;
        }
    
        public function set w(value:Number):void {
         _w = value;
        }
    
        override protected function updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void {
               super.updateDisplayList(unscaledWidth, unscaledHeight);
    
        this.height=w;
        this.weight=w;
    }
    }
    }
    

    See my updated code above.

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

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I have a French site that I want to parse, but am running into
This could be a duplicate question, but I have no idea what search terms
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am trying to loop through a bunch of documents I have to put
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has

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.