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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:39:46+00:00 2026-05-13T21:39:46+00:00

Ok I know this practically sounds elementary, but I don’t understand what I’m not

  • 0

Ok I know this practically sounds elementary, but I don’t understand what I’m not doing correct here.

I draw a simple rounded Rect

backing1.graphics.beginFill(bgColor);
backing1.graphics.lineStyle(borderSize, borderColor1);
backing1.graphics.drawRoundRect(position1, position1, sizeW-1, sizeH-1, cornerRadius1);
backing1.graphics.endFill();
//backing1.alpha = .1; //<-- tried setting alpha here didn't work

Then tried to add it into a movieClip

bgHolder = new MovieClip;
bgHolder.alpha = 0.1;
bgHolder.addChild(backing1);
addChild(bgHolder);

Still the color I’m using shows up at 100% 🙁

Full Background Class code

package display{
import flash.display.DisplayObject;
import flash.display.LineScaleMode;
import flash.display.JointStyle;
import flash.display.MovieClip;
import flash.display.Graphics;
import flash.display.Sprite;
import flash.display.Shape;
import flash.events.Event;
import flash.utils.Timer;
import flash.text.TextField;
import flash.events.TimerEvent;

import model.*;

public class Background extends Sprite {
    private const position1:Number=0;
    private const position2:Number=1;

    public static var instance:Background;

    private var vTitle        :TextField = new TextField();
    private var tStorm        :TextField = new TextField();
    private var backing1      :Shape     = new Shape();
    private var backing2      :Shape     = new Shape();
    private var bgColor:uint=0xE8E7E7;
    private var borderColor1:uint=0xCCCCCC;
    private var borderColor2:uint=0xFFFFFF;
    private var borderSize:uint=1;
    private var cornerRadius1:uint=3;
    private var cornerRadius2:uint=1;
    private var sizeW:uint;
    private var sizeH:uint;
    private var bgHolder:MovieClip;

    public var titleString:String="";


    public function Background():void {
        if (stage) {
            init();
        } else {
            addEventListener(Event.ADDED_TO_STAGE, init);

        }
        instance=this;
    }

    private function init(e:Event = null):void {

        removeEventListener(Event.ADDED_TO_STAGE, init);

        bgHolder=new MovieClip  ;
        bgHolder.alpha=0.1;
        bgHolder.addChild(backing1);
        addChild(bgHolder);
        addChild(backing2);
        addChild(vTitle);
        addChild(tStorm);
    }

    public function drawBackground(w, h, mainTitle, color, otherText):void {
        sizeW=w;
        sizeH=h;
        bgColor=color;

        titleString=mainTitle;

        vTitle.defaultTextFormat=Fonts.PlayingTitle;
        vTitle.border=false;
        vTitle.embedFonts=false;
        vTitle.gridFitType="SUBPIXEL";
        vTitle.sharpness=100;
        vTitle.antiAliasType=flash.text.AntiAliasType.ADVANCED;
        vTitle.selectable=false;
        vTitle.mouseEnabled=false;
        vTitle.x=5;// 8-3=5 to align copy to video player
        vTitle.y=8;
        vTitle.width=sizeW-16;
        vTitle.height=30;
        vTitle.text=titleString;

        tStorm.defaultTextFormat=Fonts.TouchStormR;
        tStorm.border=false;
        tStorm.embedFonts=false;
        tStorm.gridFitType="SUBPIXEL";
        tStorm.sharpness=100;
        tStorm.antiAliasType=flash.text.AntiAliasType.ADVANCED;
        tStorm.selectable=false;
        tStorm.mouseEnabled=false;
        tStorm.x=8;
        tStorm.y=sizeH-20;
        tStorm.width=sizeW-16;
        tStorm.height=20;
        tStorm.text=otherText;

        backing1.graphics.beginFill(bgColor, 0.1);
        //backing1.graphics.beginFill(bgColor);
        backing1.graphics.lineStyle(borderSize, borderColor1);
        backing1.graphics.drawRoundRect(position1, position1, sizeW-1, sizeH-1, cornerRadius1);
        backing1.graphics.endFill();
        backing1.alpha=0.5;

        backing2.graphics.beginFill(bgColor);
        backing2.graphics.lineStyle(borderSize, borderColor2);
        backing2.graphics.drawRoundRect(position2, position2, sizeW-3, sizeH-3, cornerRadius2);
        backing2.graphics.endFill();
    }

    public function switchTitle(sentText):void {
        titleString=sentText;
        vTitle.text=titleString;
    }

}

}
  • 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-13T21:39:46+00:00Added an answer on May 13, 2026 at 9:39 pm

    I tried your source code, and the problem seems to be caused by the backing2-Shape. That sprite doesn’t get any alpha, and is put ABOVE the backing 1, therefore apearing not to be transparent. When you delete the

    addChild(backing2);
    

    You will see the alpha.

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

Sidebar

Related Questions

Hi I know this sounds quite not practical but still I would like to
I know this is probably something simple but I can't seem to find anything
Not that I would want to use this practically (for many reasons) but out
Know this might be rather basic, but I been trying to figure out how
i know this is a stupid question but i d'ont know how to do
I know this is possible in Perl, but I was wondering if this can
I know this is an old question, but I have spend any hours on
I know this is repeated question on Stack. But in my case the URL
I know this is an easy concept, but I just can't seem to get
I have a problem practically identical to this question , but I'm looking for

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.