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

  • Home
  • SEARCH
  • 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 3243648
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:27:29+00:00 2026-05-17T18:27:29+00:00

Let me preface this question by saying that I am a .NET developer at

  • 0

Let me preface this question by saying that I am a .NET developer at heart, just helping a friend with a project he is working on.

I have been searching online for something that I think should be pretty simple. Here’s what I have:

  1. A standard Flash CS5 document with one layer called background.
  2. The document is associated with a class called ‘Game’ which extends MovieClip.
  3. I am executing some logic in the ‘Game’ class after calling an ‘Initialize’ method.

I want to change the background color of the document at runtime to something else (e.g., a different color, a gradient, or a picture). Simple, right? Maybe not. I can’t figure it out. Can some .NET-friendly soul kindly explain how to fix this?

  • 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-17T18:27:30+00:00Added an answer on May 17, 2026 at 6:27 pm

    If you wanted the background to change color, and not have to draw it in, javascript might be a good solution for this problem.

    what you change will depend on the embed code, but the param you’ll want to change is bgcolor.

    in prototype, the javascript would look something like this:

    $('yourFlashContainerId').down('[name="bgcolor"]').writeAttribute('value','#000000');
    

    to draw it in flash, you can do something like this:

    var bg:Sprite = new Sprite();
    bg.graphics.beginFill(0x000000);
    bg.graphics.drawRect(0,0,stage.stageWidth, stage.stageHeight);
    bg.graphics.endFill();
    bg.x = 0;
    bg.y = 0;
    addChildAt(bg,0);
    

    That will draw a square with a black background (change the hex on line 2 to change the color), set it’s size to the size of the stage, set x and y to 0, then add it at the bottom of the display stack.

    Either of those two methods should work.

    Edit: yet another way:

    You could also set the wmode param to “transparent”, and change the containing div background color.

    assuming your flash embed has the following:

    <param name="wmode" value="transparent">
    

    prototype:

    $('yourFlashContainerId').setStyle({'background-color':'#000'});
    

    jQuery:

    $('#yourFlashContainerId').css({'background-color':'#000'});
    

    native:

    document.getElementById('yourFlashContainerId').style.background-color="#000";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let me preface this question by stating that i don't usually condone the practice
so let me preface this with the fact that I am a beginner at
Let's say i have an android device that has some extra buttons on it,
To preface, I'm aware (as should you!) that using SELECT * in production is
To preface my question, couple things to note. I don't want to store said
I have a web-based documentation searching/viewing system that I'm developing for a client. Part
Let's say you have some products which have 2 fields, a description and a
Let's say I have a property foo defined in my parent POM. Is it
Let's say I'm playing 10 different games. For each game, I know the probability

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.