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

The Archive Base Latest Questions

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

I run through a few loops to build out a 32 x 32 block

  • 0

I run through a few loops to build out a 32 x 32 block
In my real example the colors vary but in testing, even simplified I am getting nowhere

var tempWidth:int = currentTileSel.width;
            var tempHeight:int = currentTileSel.height;
            var newbit:Bitmap = null;
            var myBitmapData:BitmapData = new BitmapData(tempWidth, tempHeight,true,0x000000);
            var drawCount:int = 0;

            for(var i:int = 0; i< tempHeight; i++)
            {                       
                for(var j:int = 0; j < tempWidth; j++)
                {
                    var setColor:uint = pixelArray[drawCount].colorfill;
                    myBitmapData.setPixel32(j,i,0x000000);

                    drawCount++;
                }
            }
            ///*
            currentTileSel.graphics.clear();
            currentTileSel.graphics.lineStyle(.25,0xCCCCCC,.5,false);
            currentTileSel.graphics.beginBitmapFill(myBitmapData);
            currentTileSel.graphics.drawRect(0,0,tempWidth,tempHeight);
            currentTileSel.graphics.endFill();
            currentTileSel.bitmapHolder = myBitmapData;
            //*/
            newbit = new Bitmap(myBitmapData);
            gridLoader.addChild(newbit);

I would think this would produce a black bitmap pixel by pixel, but I get nothing on the bitmapFill and nothing when I add it to the screen as a bitmap.

What am I doing wrong? Thanks a lot in advance!

  • 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-29T08:57:17+00:00Added an answer on May 29, 2026 at 8:57 am

    Your problem is this line:

    myBitmapData.setPixel32(j,i,0x000000); 
    

    Here, you are setting the transparency to 0.
    Try:

    myBitmapData.setPixel32(j,i,0xFF000000); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to run through an example given for the C++ Xerces XML library
I'm building an application that needs to run through an XML feed but I'm
I'm putting some page content (which has been run through Tidy, but doesn't need
I'm trying to run through the Hello World tutorial for the iPhone and i
I am trying to run through a program to check if vouchers are valid
I have a program that I run through the command line and I wanted
Do you know any tools that can run through the code and find defects
I have a function that is to run through each row of a table,
I have some data which I run through, which generates a textfile. The data
I have a java script code that works fine when run through a browser,

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.