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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T03:30:55+00:00 2026-06-19T03:30:55+00:00

I am trying to make single pixels flash for 1/60th of a second and

  • 0

I am trying to make single pixels flash for 1/60th of a second and then go away over a 2 second period of time until every single pixel on a 1280×720 screen has flashed white. After 2 seconds have elapsed the screen is all black again for 3 or so seconds before it loops and does it again.

The way I solved it was using this fla another stackoverflow user came up with and I modified that uses movie clips. The problem is it doesn’t work to get 921600 movie clips to start randomly. It gets really heavy and slow. See attached file that works with

Anyway! I’m sure there is a super smart way of doing this. I’m a novice. Thanks for any help or suggestions.

fla (cs5)
https://mega.co.nz/#!ERRFiJBJ!VYSaH164BcjD9QIiSdpk8WxFp68dYDC0vWzKySC8rg0

swf
https://mega.co.nz/#!kBoxmJCR!Mx7sHX94-9ch15dKdT8knHRRKRljytZXdOBK-2P-TLQ

best,
Rollin

For the original design of the fla I’m linking to above see the solution by Mahmoud Abd El-Fattah on this link.
Random Start Times for Move Clips

  • 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-19T03:30:57+00:00Added an answer on June 19, 2026 at 3:30 am

    Okay, the simplest method will be something like this:

    static const WIDTH:int=1280;
    static const HEIGHT:int=720;
    static const WH:int=WIDTH*HEIGHT;
    static const FRAMES:int=120; // 2 seconds * 60 frames. Adjust as needed
    static var VF:Vector.<int>; // primary randomizer
    static var BD:BitmapData; // displayed object
    static var curFrame:int; // current frame
    static var BDRect:Rectangle;
    function init():void {
        // does various inits
        if (!VF) VF=new Vector.<int>(WH,true); // fixed length to optimize memory usage and performance
        if (!BD) BD=new BitmapData(WIDTH,HEIGHT,false,0); // non-transparent bitmap
        BDRect=BD.rect;
        BD.fillRect(BDRect,0); // for transparent BD, fill with 0xff000000
        curFrame=-1;
        for (var i:int=0;i<WH;i++) VF[i]=Math.floor(Math.random()*FRAMES); // which frame will have the corresponding pixel lit white
    }
    function onEnterFrame(e:Event):void {
        curFrame++;
        BD.lock();
        BD.fillRect(BDRect,0);
        if ((curFrame>=0)&&(curFrame<FRAMES)) {
            // we have a blinking frame
            var cw:int=0;
            var ch:int=0;
            for (var i:int=0;i<WH;i++) {
                if (VF[i]==curFrame) BD.setPixel(cw,ch,0xffffff);
                cw++; // next column. These are to cache, not calculate
                if (cw==WIDTH) { cw=0; ch++; } // next row
            }
        } else if (curFrame>FRAMES+20) {
            // allow the SWF a brief black period. If not needed, check for >=FRAMES
            init(); 
        }
        BD.unlock();
    }
    function Main() {
        init();
        addChild(new Bitmap(BD));
        addEventListener(Event.ENTER_FRAME,onEnterFrame);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically trying to make a page for every single entry in my mysql and
I am trying to make a single dataclass that holds information from both Facebook
Good evening, I'm trying to make a single php page wich can edit/delete multiple
I'm trying to make regexp that match only 2 words and a single pace
I'm trying to make a query that looks at a single table to see
I'm trying to make a query that grabs a single row from an SQL
I am trying to make a jquery similar tabs. since its for single use
I'm trying to make a single pattern that will validate an input string. The
I am trying to make an AJAX call from several domains to a single
Im trying to make a substitution of a single line in a file with

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.