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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:19:02+00:00 2026-05-19T22:19:02+00:00

I’m making flash game, and I have the staged masked so your character can

  • 0

I’m making flash game, and I have the staged masked so your character can only see part of it. However, I don’t want the entire stage masked, I only want the “Game Area” masked. Imagine my stage is 800×800. However, the “Game” only takes up the area at the top, 800 by 600. There are 200px at the bottom where I can use for chatting, or displaying information, as your character walks around the game area.

The issue is, I setup my mask, and it masks /everything/ on stage. Even if I have something outside the “game area”, it is still hidden behind the mask. So my question is, in my flash application, how can I use my mask in the “game area”, and not have other parts of my application affected? Can I selectively put items above the mask?

Thank you!

Edit: Clarifying. My game starts by initialzing the GameScreen object:

game = new GameScreen(); //800 x 600.  Declared as class variable
game.y = 40;
addChild(game);

Before that, to make the mask all Black, I put a black rectangle behind the GameScreen:

var rect:Shape = new Shape();
rect.graphics.lineStyle(1, 0x000000);
rect.graphics.beginFill(0x000000);
rect.graphics.drawRect(0,0,800,600);
rect.graphics.endFill();
rect.y = 40;
addChild(rect);

///
/// Start the game
///
game = new GameScreen();
game.y = 40;
addChild(game);

When the GameScreen object initializes, it creates the “hole” so you can see your character.

fogOfWar = new CircleMask();
                addChild(fogOfWar);
                this.mask = fogOfWar;
                fogOfWar.x = player.x;
                fogOfWar.y = player.y;

So now, we have my game setup, with a circular hole in the mask and the player can see his character. However, also when the Game Screen object initializes, it places an infomation bar on the screen. This information bar also gets hidden by the mask. The player cannot see it. The issue is, I want this bar (and other components to be added later) to be visible to the player at all times. I can’t simply change the shape of the “hole” through the mask, because it moves with the player. So how can I allow that information bar to be seen by the player, while still hiding the game area?

Thank you again!

  • 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-19T22:19:03+00:00Added an answer on May 19, 2026 at 10:19 pm

    To get a more contextual answer, you should provide a sample of the code you are using to create the mask.

    This blog post explains clearly how to create a programmatic mask in AS3.

    From what I can gather you have the mask just sitting on the stage, it needs to be applied to another DisplayObject to be useful. At that point, the mask will move around with that DisplayObject, so you can put things infront, behind, whatever you like.

    Also, if your mask clip is blank it will mask the entire DisplayObject it’s linked to, to allow content to show through it, it will need to have a suitable shape drawn in it, content will then show through that shape.

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I don't have much knowledge about the IPv6 protocol, so sorry if the question
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported

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.