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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:59:33+00:00 2026-06-12T10:59:33+00:00

Having problem with creating a rectangle with alpha fill. Seems like UIComponent doesnot allow

  • 0

Having problem with creating a rectangle with alpha fill. Seems like UIComponent doesnot allow the “Alpha” of the filled rectangle, and converts it into 100% alpha ( alpha=1). How to make a alpha-filled rectangle in flex’s UIComponent ?

var uic:UIComponent = new UIComponent(); 


var mc:MovieClip = new MovieClip(); 

mc.graphics.beginFill(0xffcc33,0.2) // <<<<<<NOTICE THE ALPHA FILL
mc.graphics.lineStyle( 1,0xffcc33);
mc.graphics.drawRect(0,0,100,100);
mc.graphics.endFill();
uic.addChild(mc);

addElement(uic);

PS: additionally, even the filter effects like “Glow” don’t work when adding movieclip to UIComponent.

  • 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-12T10:59:34+00:00Added an answer on June 12, 2026 at 10:59 am

    You could use this code to create rectangle with “ALPHA” fill

    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   minWidth="955"
                   minHeight="600">
    
        <fx:Script>
            <![CDATA[
            import mx.graphics.SolidColor;
            import mx.graphics.SolidColorStroke;
    
            import spark.primitives.Rect;
    
            public function makeRect():void {
                var rect:Rect = new Rect();
                rect.width = 100;
                rect.height = 100;
    
                rect.fill = new SolidColor(0xffcc33, 0.2);
                rect.stroke = new SolidColorStroke(0xffcc33, 1);
    
                addElement(rect);
            };
        ]]>
        </fx:Script>
    
        <s:Button click="makeRect()"/>
    
    </s:Application>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having a problem creating a WCF service instance with a parameter. The
I've been having a problem creating a checklist in the style of the TouchCells
i am having problem in creating a video player in flash via as3, the
I'm having a problem creating a trigger on a database for a project I've
I am having a problem with creating a navigation controller after on the other
Having a bit of a problem creating an instance of an object. Bear in
I am creating an menu and having problem to access the element to hide
I'm creating shopping cart and I'm having one problem: When someone orders an item
I seem to be having a problem creating new local variables inside a switch
I am having problem creating a new directory inside my FTP using mkdir, here

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.