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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:30:27+00:00 2026-05-23T17:30:27+00:00

I have a action script from a decompile flash like this public function getResourceAsByteArray(resID:int):flash.utils.ByteArray

  • 0

I have a action script from a decompile flash like this

    public function getResourceAsByteArray(resID:int):flash.utils.ByteArray
    {
        var tempByteArray:*=null;
        var fName:*=this.clazzName;
        var resDataDup:*=new clazzByteArray() as flash.utils.ByteArray;
        var resPos:*=this.post;
        var resLength:*=1024;
        var resultByteArray:*=new flash.utils.ByteArray();
        resDataDup.position = resPos;
        resDataDup.readBytes(resultByteArray, 0, resLength);
        return resultByteArray;
    }

    public class clazzByteArray extends mx.core.ByteArrayAsset
    {
        public function clazzByteArray()
        {
            super();
            return;
        }
    }

I’m not a action script programmer, but I try to understand this function.
resDataDup is a local object from a class that extends ByteArray, and I think with this initialize way resDataDup will always empty, so the next readBytes call always fail. Is there a chance it can work in other way? (some one can put data to resDataDup before readBytes is called), or the decompiler did not generate it correct.

  • 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-23T17:30:27+00:00Added an answer on May 23, 2026 at 5:30 pm

    You’re absolutely correct. This code will not work. I suspect that what your decompiler is not telling you is that ByteArrayAssets are primarily for embedded assets in Flex. This means that clazzByteArray is actually referencing some thing which used to be embedded. But, that does not help here.

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

Sidebar

Related Questions

I have an action like this: public class News : System.Web.Mvc.Controller { public ActionResult
I have this action script that pulls images from a xml file > myPhoto
I have a problem while reading from XML file in action script 3. This
I have the following code in action script 3: async.addResponder(new Responder(result, defaultFaultHandler)); result is
Ok, So I have a external php script that get data from a DB
I have a caching problem in my action script, and to get over it
I have an actionscript file that defines a class that I would like to
I have an ActionScript 2.0 file that contains a small library. This library parses
In an actionscript function (method) I have access to arguments.caller which returns a Function
I have an action handling a form post, but I want to make sure

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.