Class problem

I try to use a code (it's an API for box.net) who wrote before Flash 5 (I use CS5.5) and get the following compilation error:

com\Box\Communication.as, line 1 5006: ActionScript file cannot have several definitions visible from the outside:

Communication.As (irrelevant deleted code) is:

com of the packaging. Box {}

import flash.events.Event

import flash.events.DataEvent

import flash.events.EventDispatcher

import flash.net.URLLoader;

import flash.net.URLRequest;

import flash.utils.setInterval;

import flash.utils.clearInterval;

import com. Box.MD5;

import com. Box.Folder;

Communication/public class extends EventDispatcher {}

public void Communication() {}

private void GetTicket (): void {}

}

private void GetTicketResponse(e:Event):void {}

}

private void GetToken() {}

}

private void GetTokenResponse(e:Event):void {}

}

public function Login (): void {}

}

public void getAccountTree(in_folderId:String,_in_onelevel:Boolean):void {}

}

private void getAccountTreeResponse(e:Event):void {}

}

public void Download(id:String):void {}

}

}

SerializableAttribute public class FolderLoadEvent extends Event {}

public var: file;

public void FolderLoadEvent(_Folder:Folder) {}

Super ("FolderLoad");

folder = _Folder;

}

}

}

Code Red is the source of the problem. FolderLoad is dealt with elsewhere. I'm a complete newbie when it comes to solutions or suggestions to work around classes, greatly appreciated.

I believe that the error is to tell you that you can have two definitions of 'public' class (visible/accessible from the outside) in a single class file.  Try to make a separate .as file.

Tags: Adobe Animate

Similar Questions

  • integer to another class problem, please help :D

    I tried a day now to solve this problem and I'm stumped. Could someone please point out what's wrong with the following code? I'm moving an integer of a class to another.

    ButtonField nextBut = new ButtonField ("Next", Field.FIELD_HCENTER) {}
    protected boolean trackwheelClick (int status, int time) {}
    If (firstChoice == 0) {}
    Dialog.Alert ("you must choose!");
    }
    else {}
    int firstChoices = firstChoice;
    UiApplication.getUiApplication () .popScreen (Ui.getUiEngine () .getActiveScreen ());
    UiApplication.getUiApplication () .pushScreen (new newGame3 (firstChoices));
                       
    }
    Returns true;        }
    public int getPreferredWidth() {}
    Return Display.getWidth ();
    }
    Protected Sub paint (Graphics Graphics) {}
    graph.setBackgroundColor (Color.BLUE);
    graph.fillRect (0, 0, getWidth(), getHeight());
    graph.setColor (Color.RED);
    Graph.Clear ();
    Super.Paint (Graph);
    }
    };
           
    nextBut.setFont (Font.getDefault () .derive (Font.BOLD));
           
    FieldChangeListener lnextBut = new FieldChangeListener() {}
    ' Public Sub fieldChanged (field field, int context) {}
    }
    }
    ;
    nextBut.setChangeListener (lnextBut);
    VMAN. Add (nextBut);

    the other class

    public class newGame3 extends form {}
       
    public newGame3 (int firstChoices) {}
    LabelField t1 = new LabelField ("new game 3" + firstChoices);
    Add (T1);
    }
    }

    I think Rexdoug meant firstChoice.

    Give a look at this example. You should get whats wrong on your code.

    public class TestScreen extends MainScreen
    {
        int firstChoice = 5;
        public TestScreen()
        {
            ButtonField nextBut = new ButtonField(" Next ", Field.FIELD_HCENTER | ButtonField.CONSUME_CLICK);
            FieldChangeListener lnextBut = new FieldChangeListener()
            {
                public void fieldChanged(Field field, int context)
                {
                    UiApplication.getUiApplication().popScreen(Ui.getUiEngine().getActiveScreen());
                    UiApplication.getUiApplication().pushScreen(new NewGame3(firstChoice));
                }
            };
            nextBut.setChangeListener(lnextBut);
            this.add(nextBut);
        }
    } 
    
    class NewGame3 extends MainScreen
        {
            public NewGame3(int firstChoice)
            {
                LabelField t1 = new LabelField(" New Game 3 "+ firstChoice);
                this.add(t1);
            }
        }
    

    Concerning

    Bika

  • Tween class problem

    well I can't really see what's wrong. appears to be an error in the flash, but maybe theres a rule im does not suite or something...
    my code:

    (main timeline)

    Import mx.transitions.Tween;
    Import mx.transitions.easing. *;

    mcNum = 1;
    mcStart = 880;
    mcFinish = - 30;
    owner of the image
    var inter = setInterval (transition, 500);

    transition() {} function
    mcName = 'line' + mcNum;
    trace (mcName);
    mcNum ++;
    mcStart = mcStart + 40;
    mcFinish = mcFinish + 40;
    var twMoveClip:Tween = new Tween (mcName, Strong.easeOut, mcStart, mcFinish, 2, true);

    If {(mcNum > 5)
    clearInterval (inter);
    }
    }
    Stop();

    the problem is that nothing moves. the track of "mcName" comes up with "line1, line2... line 5" as it should. However if I change mcName of > 'line' + mcNum < to just > line1 <. He calls line1 and makes it move. It is not not my expected results because none of the others move... ive been at this for hours. and it seems that the tween class will not work when calling on a variable that was added 2 other variables or variable and a number.

    Please help someone :(

    Try this:

  • Java class problem

    upload.png

    Version of forms: Forms [32 bit] Version 6.0.8.25.2 (Production)

    the JDK version:

    Java version "1.7.0_51".

    Java (TM) SE Runtime Environment (build 1.7.0_51 - b13)

    The Client Java VM (build 24.51 - b03, mixed mode, sharing)

    Well, I see several things.

    1 forms 6, which has moreover been desupported for many years, is based on Java version 1.2/1.3, so try to use Java 7 with it, will probably cause problems.

    2. as indicated in the error, 'java' is a reserved package name.  So, you might have to rename your package name of 'java' to something like 'myjava.

    For our benefit, can you help me understand why you use 6 shapes and not a newer version as 11.1.2.2?

  • Controller extension class problem

    Hello

    I have a custom controller class that extends the default class in e-business suite. Before you create new data on the page, I'm trying to do some field validations in the form process request method. However, when I clicked on create a button, system first add new data to the database and then trying to run my controls. Therefore, my controls become meaningless.
    Here is an example;

    public class xxgmSuppCrtCO extends SuppCrtCO {}


    {} public processRequest Sub (pageContext OAPageContext, OAWebBean webBean)

    super.processRequest (pageContext, webBean);
    pageContext.putDialogMessage (new OAException ("s5 :"));

    }

    public void processFormRequest (pageContext, OAPageContext,
    {OAWebBean webBean)
    super.processFormRequest (pageContext, webBean);
    If (pageContext.getParameter ("applyBtn")! = null) {}
    a validation here
    I throw an expection when the condition is met
    throw new OAException (Err2, OAException.ERROR);
    }
    }
    }

    super.processFormRequest (pageContext, webBean);

    This will call methods processFormRequest seeded. that is when you click on any event seeded operations will be first made, then your code if it is necessary.

    So call it "super.processFormRequest (pageContext, webBean);" after your code.

    for example

    public void processFormRequest(OAPageContext pageContext,
    OAWebBean webBean) {
    if (pageContext.getParameter("applyBtn") != null) {
    //your code
    super.processFormRequest(pageContext, webBean);
    }
    else
    {
    super.processFormRequest(pageContext, webBean); // this is required because for other events(apart from apply button) seeded methods should be called
    }
    
    }
    

    -Anand

  • Missing classes (problem FB4)

    I installed FB 4 and created a project that uses the SDK version 3.5

    But I can't compile my code because the classes in the flash.display package are missing:

    where.PNG

    WHRE was therefore the GraphicsPath and other classes go?

    3.5 SDK uses default 9.0.124 player. To change this to 10:

    (1) project properties

    (2) compile flex

    (3) under 'Options of Adobe Flash Player', select use a specific version and enter 10.0.0

    (4) OK

    GraphicsPath classes will be displayed in the code hints and compile fine.

    Jason San Jose

    Software engineer, Flash Builder

  • custom with LoadVars class problem

    Hi all

    What I am trying to create is a 'ping on the server' class, a local Flash application can check if a variable remote server is online.
    As you'll see in the example, I created a ping() function, that executes the pingServer:LoadVars.
    The strange thing for me, is that I can put a variable in a class of a function within this category, but I can't set a variable of pingServer.onLoad located in this feature...
    (It is actually the first time I'm trying to create a class..)

    Any suggestions?

    Inside the callback, class managers ythe members out of reach. There are several ways to resolve this. We use a local variable that maintains a reference to the current object.
    function ping (): Void {}
    var thisObj:ping_server =;

    and to the members of the class:
    thisObj.serverstatus = 'pingServer_lv.onLoad = online;

  • Tween class problems

    IV written an interpolation function a mc that works very well. the problem is that I want to use the same function on 30 different mc so its pointless to me re-writing of it for each of them.

    This version works very well and the trace is showing which is set the page variable:
    function navOut(e:MouseEvent):void {}
    var page: String = e.target.name;
    track (page);
    var myTween:Tween = new Tween (.buttonThumb button, "y", Regular.easeOut,-25, 0, 0.5, true);
    }


    but I need to replace the underlined key with the page variable so I can use it on the MC. and of course does not page.buttonThumb .

    any help is very appreciated!

    and you will probably need to cast e.currentTarget as a movieclip:

    var page = MovieClip (e.currentTarget) .buttonThumb;

  • Class problem after replaced by the new Java class

    Hello

    I made a java class to a ColdFusion 7.02 Server (linux red hat 3.2)
    At the beginning, that it worked perfectly.
    Then I made a new version with some extra methods, succeeded him, restarted the service and empty the cache. Still, he finds none of the new methods, but it is not the 'old'. What can I do?

    Is there a way you can check the version of the file on the server .class? Human error perhaps?

    How you access to and use of the class? Care to post some code snippets?

  • Sprite class problem

    Gives an error.
    See the code provided herewith.
    JST want to draw this sprite and animate.
    Thank you very much

    You need to add it to the displayList and do that she should be wrapped in a UIComponent:

  • Java Calendar problem

    Hello

    I have problems with the Java Calendar class:

    Problem 1:
    I try to fix the Java calendar date, but an exception is thrown. The issues dates are 19210501 and 19420403 (YYYYMMDD) to midnight (time of day = 0, minutes = 0, seconds = 0, milliseconds = 0). Setting other dates between 15000101 and 22000101 work OK. Exception is thrown when the calendar calculates new values. Note that this exception is NOT thrown if I don't have hour / minute / second fields!

    Problem 2:
    I put the Java specific date schedule has and convert that date to timeInMillis. Then I put this timeInMillis for calendar and convert them to date B. For some dates has! = B. problematic dates are 19210501 and 19420403 (YYYYMMDD) to midnight (time of day = 0, minutes = 0, seconds = 0, milliseconds = 0). Setting other dates between 15000101 and 22000101 work OK.

    These problems occur if timeZone = "Europe/Helsinki. Problem does not occur if timeZone = "EET" or "GMT".

    Example code for this issue is below:
    ==================
    package z_javaexperiments5;

    import java.util.Calendar;
    import java.util.TimeZone;

    public class CalendarProblem {}

    Public Shared Sub main (String [] args) {}

    Main CalendarProblem = new CalendarProblem();

    System.out.println ("RunSetCalendars");

    Time zone time zone = TimeZone.getTimeZone ("GMT");
    main.runSetCalendars (time zone, L 19420403000000000);
    main.runSetCalendars (time zone, L 19210501000000000);
    main.runSetCalendars (time zone, L 19210502000000000);

    zone = TimeZone.getTimeZone ("EET");
    main.runSetCalendars (time zone, L 19420403000000000);
    main.runSetCalendars (time zone, L 19210501000000000);
    main.runSetCalendars (time zone, L 19210502000000000);

    zone = TimeZone.getTimeZone (' Europe/Helsinki');
    main.runSetCalendars (time zone, L 19420403000000000);
    main.runSetCalendars (time zone, L 19210501000000000);
    main.runSetCalendars (time zone, L 19210502000000000);

    }

    Calendar setCalendar1 (time zone time zone, long dateTimeYYYYMMDDHHMMSSsss) {}
    Calendar calendar = Calendar.getInstance (timeZone);
    Calendar.Clear ();
    System.out.println ("setCalendar1 timeZone =" + calendar.getTimeZone () .getID ());

    year int = (int) (dateTimeYYYYMMDDHHMMSSsss / 10000000000000L);
    int month = (int) ((dateTimeYYYYMMDDHHMMSSsss % L 10000000000000) / 100000000000 L)-1;
    Day = (int) ((dateTimeYYYYMMDDHHMMSSsss % L 100000000000) int / 1000000000);
    int h = (int) ((dateTimeYYYYMMDDHHMMSSsss % 1000000000) / 10000000);
    int min = (int) ((dateTimeYYYYMMDDHHMMSSsss % 10000000) / 100000);
    dry int = (int) ((dateTimeYYYYMMDDHHMMSSsss % 100000) / 1000);
    int mSec = (int) (dateTimeYYYYMMDDHHMMSSsss % 1000);
    System.out.println (year + "." + (month + 1) + "." + day + "" + hour + ":" + min + ":" + dry + "." + mSec);
    Calendar.Set (year, month, day);
    Calendar.Set (Calendar.HOUR_OF_DAY, time);
    Calendar.Set (Calendar.MINUTE, minutes);
    Calendar.Set (Calendar.SECOND, dry);
    Calendar.Set (Calendar.MILLISECOND, mSec);
    calendar.setLenient (false); Reject invalid values

    try {}
    Calendar.get (Calendar.SECOND); Recalculate values
    } catch (IllegalArgumentException e) {}
    throw new RuntimeException ("Invalid argument: cannot convert long dateTimeYYYYMMDDHHMMSSsss, long =" + dateTimeYYYYMMDDHHMMSSsss + "message of Exception =" + e.getMessage ());
    }

    return calendar;
    }

    Calendar setCalendar2 (time zone time zone, long dateTimeYYYYMMDDHHMMSSsss) {}
    Calendar calendar = Calendar.getInstance (timeZone);
    System.out.println ("setCalendar2 timeZone =" + calendar.getTimeZone () .getID ());
    Calendar.Clear ();

    year int = (int) (dateTimeYYYYMMDDHHMMSSsss / 10000000000000L);
    int month = (int) ((dateTimeYYYYMMDDHHMMSSsss % L 10000000000000) / 100000000000 L)-1;
    Day = (int) ((dateTimeYYYYMMDDHHMMSSsss % L 100000000000) int / 1000000000);
    int h = (int) ((dateTimeYYYYMMDDHHMMSSsss % 1000000000) / 10000000);
    int min = (int) ((dateTimeYYYYMMDDHHMMSSsss % 10000000) / 100000);
    dry int = (int) ((dateTimeYYYYMMDDHHMMSSsss % 100000) / 1000);
    int mSec = (int) (dateTimeYYYYMMDDHHMMSSsss % 1000);
    System.out.println ("Initial dateTime =" + year + "." + (month + 1) + "." + day + "" + hour + ":" + min + ":" + dry + "." + mSec "");
    Calendar.Set (year, month, day);
    If (hour! = 0)
    Calendar.Set (Calendar.HOUR_OF_DAY, time);
    on the other
    Calendar.Clear (Calendar.HOUR_OF_DAY);
    If (min! = 0)
    Calendar.Set (Calendar.MINUTE, minutes);
    on the other
    Calendar.Clear (Calendar.MINUTE);
    If (s! = 0)
    Calendar.Set (Calendar.SECOND, dry);
    on the other
    Calendar.Clear (Calendar.SECOND);
    If (mSec! = 0)
    Calendar.Set (Calendar.MILLISECOND, mSec);
    on the other
    Calendar.Clear (Calendar.MILLISECOND);
    calendar.setLenient (false); Reject invalid values

    try {}
    Calendar.get (Calendar.SECOND); Recalculate values
    } catch (IllegalArgumentException e) {}
    throw new RuntimeException ("Invalid argument: cannot convert long dateTimeYYYYMMDDHHMMSSsss, long =" + dateTimeYYYYMMDDHHMMSSsss + "message of Exception =" + e.getMessage ());
    }

    long millis = calendar.getTimeInMillis ();
    System.out.println ("Initial dateTime =" + millis);

    Calendar = Calendar.getInstance (timeZone);
    Calendar.Clear ();

    calendar.setTimeInMillis (millis);
    an2 int = calendar.get (Calendar.YEAR);
    Month2 = calendar.get (Calendar.MONTH) int;
    day 2 = int calendar.get (Calendar.DAY_OF_MONTH);
    time2 int = calendar.get (Calendar.HOUR_OF_DAY);
    min2 int = calendar.get (Calendar.MINUTE);
    sec2 int = calendar.get (Calendar.SECOND);
    mSec2 int = calendar.get (Calendar.MILLISECOND);
    System.out.println ("Final dateTime =" + an2 + '. ' + (Month2 + 1) + "." + day2 + "" + time2 + ":" + min2 + ":" + S2 + "." + mSec2 "');
    If ((année! = AN2) |) (month! = Month2) | (day! = day2) | (time! = time2) | (min! = min2) | (s! = S2) | (mSec! = mSec2))
    System.out.println ("setCalendar2 failed, dates are not equal");
    return calendar;
    }

    void runSetCalendars (time zone time zone, long dateTimeYYYYMMDDHHMMSSsss) {}
    System.out.println ("");
    System.out.println ("runSetCalendars dateTimeYYYYMMDDHHMMSSsss =" + dateTimeYYYYMMDDHHMMSSsss);
    try {}
    setCalendar1 (time zone, dateTimeYYYYMMDDHHMMSSsss);
    } catch (RuntimeException e) {}
    System.out.println ("failed to setCalendar1, dateTimeYYYYMMDDHHMMSSsss =" + dateTimeYYYYMMDDHHMMSSsss + "Exception ="+ try () ");
    }

    Calendar calendar = null;
    try {}
    calendar = setCalendar2 (time zone, dateTimeYYYYMMDDHHMMSSsss);
    long timeInMillis = calendar.getTimeInMillis ();
    Calendar.Clear ();
    calendar.setTimeInMillis (timeInMillis);
    } catch (RuntimeException e) {}
    System.out.println ("failed to setCalendar2, dateTimeYYYYMMDDHHMMSSsss =" + dateTimeYYYYMMDDHHMMSSsss + "Exception ="+ try () ");

    }
    }

    }
    ==================

    The program output is below:
    ==================
    RunSetCalendars

    runSetCalendars dateTimeYYYYMMDDHHMMSSsss = 19420403000000000
    setCalendar1 timeZone = GMT
    1942.4.3 0:0:0.0
    setCalendar2 timeZone = GMT
    Initial DateTime = 1942.4.3 0:0:0.0
    Final DateTime = 1942.4.3 0:0:0.0

    runSetCalendars dateTimeYYYYMMDDHHMMSSsss = 19210501000000000
    setCalendar1 timeZone = GMT
    1921.5.1 0:0:0.0
    setCalendar2 timeZone = GMT
    Initial DateTime = 1921.5.1 0:0:0.0
    Final DateTime = 1921.5.1 0:0:0.0

    runSetCalendars dateTimeYYYYMMDDHHMMSSsss = 19210502000000000
    setCalendar1 timeZone = GMT
    1921.5.2 0:0:0.0
    setCalendar2 timeZone = GMT
    Initial DateTime = 1921.5.2 0:0:0.0
    Final DateTime = 1921.5.2 0:0:0.0

    runSetCalendars dateTimeYYYYMMDDHHMMSSsss = 19420403000000000
    time zone = EET setCalendar1 schedule
    1942.4.3 0:0:0.0
    time zone = EET setCalendar2 schedule
    Initial DateTime = 1942.4.3 0:0:0.0
    Final DateTime = 1942.4.3 0:0:0.0

    runSetCalendars dateTimeYYYYMMDDHHMMSSsss = 19210501000000000
    time zone = EET setCalendar1 schedule
    1921.5.1 0:0:0.0
    time zone = EET setCalendar2 schedule
    Initial DateTime = 1921.5.1 0:0:0.0
    Final DateTime = 1921.5.1 0:0:0.0

    runSetCalendars dateTimeYYYYMMDDHHMMSSsss = 19210502000000000
    time zone = EET setCalendar1 schedule
    1921.5.2 0:0:0.0
    time zone = EET setCalendar2 schedule
    Initial DateTime = 1921.5.2 0:0:0.0
    Final DateTime = 1921.5.2 0:0:0.0

    runSetCalendars dateTimeYYYYMMDDHHMMSSsss = 19420403000000000
    setCalendar1 timeZone = Europe/Paris
    1942.4.3 0:0:0.0
    setCalendar1 failed, dateTimeYYYYMMDDHHMMSSsss = Exception 19420403000000000 = java.lang.RuntimeException: bad argument: cannot convert long dateTimeYYYYMMDDHHMMSSsss, long = Exception 19420403000000000 message = HOUR_OF_DAY
    setCalendar2 timeZone = Europe/Paris
    Initial DateTime = 1942.4.3 0:0:0.0
    Final DateTime = 1942.4.3 1:0:0.0
    setCalendar2 failed, dates are not equal

    runSetCalendars dateTimeYYYYMMDDHHMMSSsss = 19210501000000000
    setCalendar1 timeZone = Europe/Paris
    1921.5.1 0:0:0.0
    setCalendar1 failed, dateTimeYYYYMMDDHHMMSSsss = Exception 19210501000000000 = java.lang.RuntimeException: bad argument: cannot convert long dateTimeYYYYMMDDHHMMSSsss, long = Exception 19210501000000000 message = MINUTE
    setCalendar2 timeZone = Europe/Paris
    Initial DateTime = 1921.5.1 0:0:0.0
    Final DateTime = 1921.5.1 0:20:8.0
    setCalendar2 failed, dates are not equal

    runSetCalendars dateTimeYYYYMMDDHHMMSSsss = 19210502000000000
    setCalendar1 timeZone = Europe/Paris
    1921.5.2 0:0:0.0
    setCalendar2 timeZone = Europe/Paris
    Initial DateTime = 1921.5.2 0:0:0.0
    Final DateTime = 1921.5.2 0:0:0.0
    ==================

    Why the program fails when timeZone = ' Europe/Helsinki '?

    Could it be related to changes in time zone that took place at that time?

    http://www.timeanddate.com/worldclock/clockchange.html?n=101&year=1921

  • detect another mc is a class

    I'm doing my first game. I have a simple class problem that I don't understand. In the game, the user must "hang up" bikes on hooks. Thus, a simple drag and drop mousevent. The problem I have is the detection of the mc to hook on the scene. How can I refrence mc this/that is in contact with the bikes? Each mc hook is named ["hook_" + i] - I be a number between a loop. OK, so I have to this day I do not like because are the MC limited to people named "hook_"... ineed to be able to detect anything it is unlocked as soon as

    -Sorry for the double post... I couldn't find a place to "move".

    I guess the size of the table is the question. You can easily performance test against the total expected without developing the code around or even using the code above.

    While I was talking, when you push down on the table, make an object variable (or a custom class). Another property of the class would include a reference the MovieClip or TextField. Then you can have another property that identifies its type, if you like and more properties and methods that determine what ever.

    You can create a loop for each object class like in the attached code.

    A notch above a generic object is to create a class to define your objects and link them to the class to a MovieClip symbol. Then, you instantiate those and their instance variable you no that need to push towards the table. A more sophisticated OO model could include an interface to set the similarities of the target and then you generate each type of target as a MovieClip and bind the appropriate class.

  • Bouba Analyzer: How to control the number of points per decade?

    Total newbie here. I can't control the number of points per decade in the Bode VI. It's always 5 points per decade.

    Don't know even how to get the Version of Elvis #, but it is at a minimum 4.1, because Elvis installer will install 4.1 (said the current version is most recent). Running Windows XP.

    How can I get Elvis to respond to my request for more points per decade?

    Mike

    Hi Mike,.

    If you are still curious about what drivers you have installed, you can view by using the Measurement & Automation Explorer (start"all programs" National Instruments"Measurement & Automation Explorer).  "Once their, go to my system" software and you'll find NI ELVISmx and its version.

    This behavior you're seeing is a known, class problem under Corrective Action Request (CAR) #373017.  For now, the number of points per decade will remain at 5.  Please wait for the next update of NOR-ELVISmx to see if this problem is fixed.

    See you soon,.

  • Explain the cause of the error-2147312566

    I try to open a reference to Excel, and I get the error (-2147312566). I need more information on how to solve this problem.

    Which is sometimes caused by registration with ActiveX classes problems. You can try to re - register Excel as suggested here. (Article is oriented for LabWindows, but it applies as well to LabVIEW).

  • Limit of BitmapData

    Hello

    I get a flash error when creating many BitmapDatas (I don't know of a bitmap that is too big).

    I have created for you a class copy-and - paste that reproduces the error.

    Just create a class problem file copy paste this code, then instantiate this class in your main class (New Issue()).

    package 
    {
    
              import flash.display.Bitmap;
              import flash.display.BitmapData;
              import flash.display.MovieClip;
              import flash.events.Event;
    
              public class Issue extends MovieClip
              {
    
                        private var mc:MovieClip;
    
                        public function Issue():void
                        {
                                  addEventListener(Event.ENTER_FRAME, eachFrame);
    
                                  mc = new MovieClip();
                        }
    
                        private function eachFrame(e:Event):void
                        {
                                  for (var i:uint = 0; i < 100; i++)
                                  {
                                            createBitmap();
                                  }
                        }
    
                        private function createBitmap():void
                        {
                                  var bm:Bitmap = getBitmap();
    
                                  mc.addChild(bm);
                        }
    
                        private function getBitmap():Bitmap
                        {
                                  var bmd:BitmapData = new BitmapData(500, 500);
    
                                  return new Bitmap(bmd);
                        }
    
              }
    
    
    }
    
    

    The error I get:

    ArgumentError: Error #2015: Invalid BitmapData.
     at flash.display::BitmapData/ctor()
     at flash.display::BitmapData()
    

    I noticed something is when to reduce flash size bitmap will produce bitmaps more before the error.

    By multiplying:

    Bitmaps created before the error has been generated x each BitampData size (example BitmapData size: 500 x 500), the total amount of pixels generated until the error has been generated is very similar: more 400000000.

    Amount of the bitmaps generated until the error has been generated, in bulk of 100:

    1600: 500 x 500

    2600: 400 x 400

    4800: 300 x 300

    Creating in smaller bulk will lead to more precise figures, but I think I'm onto something here - deliberate limit flash?

    more likely, it is the limit of your ram.

Maybe you are looking for