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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:40:29+00:00 2026-05-31T13:40:29+00:00

I am writing class that extends adobe air PNGEncoder, I want to use the

  • 0

I am writing class that extends adobe air PNGEncoder,

I want to use the writeChunk method, but it seems to be private static and i cant seems to use it with my code
But it gives the error as below

ERROR :
Description Resource Path Location Type
1061: Call to a possibly undefined method writeChunk through a reference with static type com.adobe.images:PNGEncoder. pngMethods.as /FOTO_WITH_AS3_1/src/xmp line 121 Flex Problem

My class

public class pngMethods extends PNGEncoder
{

    public function pngMethods()
    {
        super();            
    }
    public function myMethod(pngOutput:ByteArray,IHDRByteArray:ByteArray):void
    {
        super.writeChunk(pngOutput,0x49484452,IHDRByteArray);
    }
}

Adobe PNG METHOD

    private static var crcTable:Array;
    private static var crcTableComputed:Boolean = false;

    private static function writeChunk(png:ByteArray, 
            type:uint, data:ByteArray):void {
        if (!crcTableComputed) {
            crcTableComputed = true;
            crcTable = [];
            var c:uint;
            for (var n:uint = 0; n < 256; n++) {
                c = n;
                for (var k:uint = 0; k < 8; k++) {
                    if (c & 1) {
                        c = uint(uint(0xedb88320) ^ 
                            uint(c >>> 1));
                    } else {
                        c = uint(c >>> 1);
                    }
                }
                crcTable[n] = c;
            }
        }
        var len:uint = 0;
        if (data != null) {
            len = data.length;
        }
        png.writeUnsignedInt(len);
        var p:uint = png.position;
        png.writeUnsignedInt(type);
        if ( data != null ) {
            png.writeBytes(data);
        }
        var e:uint = png.position;
        png.position = p;
        c = 0xffffffff;
        for (var i:int = 0; i < (e-p); i++) {
            c = uint(crcTable[
                (c ^ png.readUnsignedByte()) & 
                uint(0xff)] ^ uint(c >>> 8));
        }
        c = uint(c^uint(0xffffffff));
        png.position = e;
        png.writeUnsignedInt(c);
  • 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-31T13:40:31+00:00Added an answer on May 31, 2026 at 1:40 pm

    Private methods are invisible to the outside world — even inheritance won’t do.

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

Sidebar

Related Questions

I am using ActionScript3, I am writing a class that extends Bitmap, I want
I'm writing a class that extends a UIScrollView to display a large tiled image,
I'm writing a Ruby class that extends TCPSocket . Assume it looks something like
I'm writing a custom web part that extends DataFormWebPart. public class MyCustomWebPart : DataFormWebPart{
So I'm writing a class that extends a dictionary which right now uses a
I've created a custom check-in policy for TFS by writing a class that extends
I am writing a class that I know that needs a lock, because the
I'm writing a class that returns both a DataTable and a IEnumerable. I cannot
I am writing a class that inherits from IHttpHandler for script and css combining.
I am writing a class that inherits from IHttpHandler for script and css combining.

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.