Three dimensional array causing repeating pause in movie

I'm creating what is essentially a 3 dimensional array. It's
an array of objects, and each of those objects (a map) contains a
few properties, one of which is a two dimensional array of tile
objects. The strange thing is that the act of pusing each of these
map objects on the array causes my movie to run with a periodic
(about once a second) pause. The more map objects are pushed onto
the array, the longer the pause. In between the pause, the movie
runs at what seems like normal speed.
Does this sound normal? I can see the movie slowing down
while building the 3 dimensional array, but once the array is built
(and i've verified that it builds corrently- no endless loops or
anything), even if I do absolutely NOTHING wtih it I still get the
pause for as long as my movie runs...
that's the part that really seems strange to me- the
repeating pause is directly related to my pushing of the map
objects onto an array... Even if I build all the map objects and
don't push them onto an array, the movie plays fine...
Any ideas or help would be appreciated. For anyone who is
interested, the associated actionscript is attached. Thanks!

anyone? I don't need a direct solution... if anything the
biggest problem I'd like to understand is that if all my objects
are already created (i.e. already stored in memory), and my array
is already created- how can simply pushing the objects onto the
array cause a recurring pause/performance hit- even if I don't use
the objects (including the array) at all (? All the memory is
allocated already- all i'm doing is pushing a reference to the
object onto the array, right? If anything I would think there could
be a performance hit WHILE pushing objects onto the array, but what
the heck is creating the pause/performance issue the rest of the
time?
I would really appreciate any help, I don't know any flash
experts in person, and I've been racking my brain on this
one!

Similar Messages

  • Creating a colored cube from a three-dimensional array

    Hey guys,
    I'm working on this application which basically displays a 3-dimensional MRI representation of a brain as well as 2-dimensional slices of that representation. As of right now, this MRI data is being stored as gray-scale values in a 3-dimensional array. I've perused the Java3d tutorial and API but I'm not quite sure how I should go about doing this. I am new to using Java3D and so I was wondering if any of you more experienced guys could suggest what you believe is the most sensible as well as efficient method of going about doing this. I was thinking of treating each element in the array as a pixel and representing each pixel as a cube or some other geometric object but this seems highly inefficient and considerably difficult to work with in terms of allowing the user to manipulate (rotate, etc.) the object. I've looked into using geometry arrays but I'm not quite sure they are what I want. Any thoughts, even those such as "this is a stupid post, do more research, the answer is pretty obvious", would be greatly appreciated.

    hi there,
    i'm not sure if this will help.
    I don't know how Java3D does things but anytime i've used or
    seen grey scale(RAW)data being used, the source data
    is copied into an API data container(e.g. Vertex Buffer) and then this data
    is accessed by an index buffer. So, if i were you i would think about
    looking at some Java3D data containers to copy your data into.
    I don't know how you have structured your program but from what i have seen\know
    the gray scale data is used as a height value to the other two
    values(x, z). So for example, you have an image call it a mesh
    this mesh has verticies(x,y,z). These verticies represent your image data.
    The grayscale image data is the height of your y parameter.
    very simplistic but hey this stuff is new to me.

  • Three Dimensional Array.. help?

    Ok so in the program I am writing I need a 3D Array.. Im assuming that it is similar to 2D Arrays.. but my code seems to be doing weird things..
    char
    char[]
    char[][]I know that those work.. but does:
    char[][][]because when I compile my files I dont get any errors (JCreator)
    JCreator checks the code for errors, but it didnt give me any error messages for using char[][][] and adding stuff to it char[r][c][h] = char; is it possible to use a 3D array like this? I dont want to have 3 regular arrays..

    Ok.. So to check if it worked I made a NEW java file and tested out the code..
    public class Test
         char[][][] table = char[3][3][3];
         char cLoc = 97;
         public static void main(String[] args)
              for(int r = 0; r < 3; r++)
                   for(int c = 0; c < 3; c++)
                        for(int h = 0; h < 3; h++)
                             table[r][c][h] = cLoc;
                             cLoc = 98;
              System.out.println("=====");
              for(int r = 0; r < 3; r++)
                   for(int c = 0; c < 3; c++)
                        for(int h = 0; h < 3; h++)
                             System.out.println(table[r][c][h]);
    }When I compile with JCreator it says:
    ' ] ' expected line 3
    ' .class ' expected line 3
    Line three:
         char[][][] table = char[ 3 ][ 3 ][ 3 ];

  • Multi-Dimensional Arrays

    Greetings everyone,
    Currently I am working on a project for school, this is my first term in Java and a project we have been assigned to do is pretty much create a application (using the SDK for use on the computer only) and create a application where a new user can modify a new computer from a base system via combo boxes, check boxes, radio buttons and what not. Here is me question. I was going to try and get tricky and create a three dimensional array to link the combo box with a label so the end user could choose an up grade, see what the upgrade did and see what the cost was say for instance:
    Athlon 64X2 4200+(combo) amd athlon 64 X2 4200+ 2.2GHz 1MB Cache Add $300.00
    Each one of those i was thinking i could place in a seperate column and each have a variable already assigned such as array[0][0] = Athlon64X2 4200+ array[0][1]="AMD Athalon 64.." array[0][2]="Add $300.00". I thought that, maybe it is, and i did something wrong and missed something. Anyhow, now i have broke it down to trying to do it with a reg array feeding the combo and the two dimensional array doing teh cost upgrade and the description, i guess my question is, why is it when i seem to try everything to grab the information i set in the array it does not seem to want to pull it. And if and when i do get it to work, how can i link the two dim with the combo. I am rather confused, maybe i am looking more into it then there really is, which i have done in other languages.
    If someone could give me a moch code using what i had there so i might clear the fog in me head, it would be greatly appreciated. If i have confused others with my confusion, just ask and i will try to clear it up. Thanks for all and any help.
    Whitz3nd

    The course i am taking is a rather basic Java programming class. We are using arrays instead of databases to get use to working with handling data. That is why the arrays. If that clears anything up. I know it seems kind of crude, like i said it is a basic Java class.
    Here is an easier question, that i would like to know:
    in a two dimensional array,
    if i had this info:
    AMD Athlon64 3100+
    AMD Athlon64 3300+
    AMD Athlon64 3800+
    and
    Add $100.00
    Add $200.00
    Add $200.00
    How would i place this data into an array. Would it be this way:
    String [][] test = { {"AMD Athlon64 3100+,Add $100.00"}, {"AMD Athlon64 3300+,Add $200.00"},{"AMD Athlon64 3800+,Add $200.00"} };
    As i said, i am a new person to the programmaing world, so please excuse my shortcomings!

  • How can I use two single-dimensional arrays-one for the titles and array

    I want to Use two single-dimensional arrays-one for the titles and one for the ID
    Could everyone help me how can i write the code for it?
    Flower
    public class Video
    public static void main(String[] args) throws Exception
    int[][] ID =
    { {145,147,148},
    {146,149, 150} };
    String[][] Titles=
    { {"Barney","True Grit","The night before Christmas"},
    {"Lalla", "Jacke Chan", "Metal"} };
    int x, y;
    int r, c;
    System.out.println("List before Sort");
    for(c =0; c< 3; ++c)
    for(r=0; r< 3; ++ r)
    System.out.println("ID:" + ID[c][r]+ "\tTitle: " + Titles[c][r]);
    System.out.println("\nAfter Sort:");
    for(c =0; c< 3; ++c)
    for(r=0; r< 3; ++ r)
    System.out.println("ID:" + ID[c][r]+ "\tTitle: " + Titles[c][r]);

    This is one of the most bizarre questions I have seen here:
    public class Video
    public static void main(String[] args) throws Exception
    int[] ID = {145,147,148, 146,149, 150};
    String[] Titles= {"Barney","True Grit","The night before Christmas", "Lalla", "Jacke Chan", "Metal"};
    System.out.println("List before Sort");
    for(int i = 0; i < Titles.length; i++)
       System.out.println("ID:" + ID[i]+ "\tTitle: " + Titles);
    System.out.println("\nAfter Sort:");
    for(int i = 0; c < Titles.length; i++)
    System.out.println("ID:" + ID[i]+ "\tTitle: " + Titles[i]);
    Generally you don't use prefix (++c) operators in you for loop. Use postfix (c++).
    Prefix means that it will increment the variable before the loop body is executed. Postfix will cause it to increment after.

  • Assigning values to 2D Multi-Dimensional arrays ??

    How do I assign a value to a Multi-dimensional 2D Array,
    that has the righter array size omitted as it changes�.
    Code�
    SomeObj foobar = new SomeObj (first, second);
    SomeObj [ ] [ ] d2D = new SomeObj [10] [ ];
    d2D [0][0] = foobar;     //Causes a null pointer exception�
    NB: seems if I initiate �d2D = new SomeObj [10] [10];� with the righter array size initiated then the error doesn�t occur, but because of the nature of the data the size of each secondary array varies�
    Thx. Kharsim

    apparently not...
    from what i read up on Multi-Dimensional arrays, you only have to give a value to the leftest bracket...
    e.g.
    int [ 5 ] [     ] [     ] <~ Acceptable in Java
    int [ 5 ] [  6 ] [     ] <~ Acceptable in Java
    int [ 5 ] [  6 ] [ 24 ] <~ Acceptable in Java
    int [ 5 ] [     ] [ 24 ] <~ Not acceptable in Java
    so using arrays it should be possible to assign a value in either of the acceptable cases, but couldnt find a source that had such an example...

  • How do we save three 1D arrays in while loop as an excel file? I used build array, waveform. I could not make it work.

    I have three separate 1 dimensional arrays in a while loop. I need to combine these arrays and save as a excel file outside the loop.
    My second question is that is there any emergency STOP button in Labview so that when I press that button, it cuts all the power going to the system. Thanks...

    Just a comment on the Stop button.
    It's not really a good idea to rely solely on a software emergency shutdown. Especially if the shutdown is to prevent some type of hazardous condition to the people running the test. The problem is that if your application or PC in general is having some type of problem, it may not be able to shut everything down as needed.
    You should always have a mechanical �Big Red Stop Button� that you can hit to cut power to everything. In addition to the button, I usually do have LabVIEW monitor things and if conditions are not looking good, have it automatically shut things down. This has always worked good, and I can�t remember any time I�ve actually had to use the big button, but it�s nice to know it�s there.
    VERY IMPORT
    ANT:
    Using the �Abort� button on the LabVIEW toolbar is NOT the thing to do. This stops your application where ever it is in its execution and does not allow it to finish or execute any shutdown code you might have put in. A �Kill� button on the front panel works well. I�ve put a single Boolean terminal in its own little While loop to monitor it. It usually writes to a digital line that�s holding a relay on that will cut the power.
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.

  • Why do panel array positions change when I move to a computer with LCD screen?

    I wrote a program in the lab and then moved it to the production area which
    has a computer with an lcd monitor. The program has 3 arrays of clusters on
    the front panel and each contain both controls and indicators. When I moved
    it to the production computer the 3 array moved somewhat from their proper
    positions. Also, each one moved a different distance. I wanted them to be
    aligned so I ended up moving them out of alignment on the uncompiled copy so
    that the production copy would be aligned correctly. Is there something
    funny about lcd screens? Labview property node reports they are already
    aligned and of equal height. Is there a way of forcing the arrays to align
    no mat
    ter what computer it is installed on?

    I've seen this before. If the resolutions are different it scales certain fonts
    differently causing your controls to move. You need to make sure your using a
    common font type and size between them or change your resolution on your desktop
    to match the lcd's.
    You can check the font on both machines to match them. One might have Arial 13,
    20, 28 and the other Ariel 14, 20, 26. If you pick 20 it will go back and forth
    ok, properly scaled.
    Jim
    Adam Russell wrote:
    > I wrote a program in the lab and then moved it to the production area which
    > has a computer with an lcd monitor. The program has 3 arrays of clusters on
    > the front panel and each contain both controls and indicators. When I moved
    > it to the production computer the 3 array moved somewhat
    from their proper
    > positions. Also, each one moved a different distance. I wanted them to be
    > aligned so I ended up moving them out of alignment on the uncompiled copy so
    > that the production copy would be aligned correctly. Is there something
    > funny about lcd screens? Labview property node reports they are already
    > aligned and of equal height. Is there a way of forcing the arrays to align
    > no matter what computer it is installed on?

  • Set number of elements in a two dimensional array

    Hi,
    Does anyone know how to set the number of elements in a two dimensional array directly in teststand.
    To set a one dimsional array is simple:
    SetNumElements( locals.somearray,4)
    Is there a method to do this for a two dimensional array?
    Sean

    From the help file (TestStand 4.2.0):
    PropertyObject.SetNumElements
    SetNumElements Method
    Syntax
    PropertyObject.SetNumElements ( numElements, options = 0)
    Purpose
    Sets the number of elements of a single dimensional array.
    Remarks
    This method is only valid for single dimensional arrays. The elements in the array retain their values. Use the PropertyObjectType.ArrayDimensions property to set the number of elements in each dimension of a multi-dimensional array.
    Parameters
    numElements As Long
    [In] New number of elements for the array.
    options As Long
    [In] Pass 0 to specify the default behavior, or pass one or more PropertyOptions constants. Use the bitwise-OR operator to specify multiple options.
    This parameter has a default value of 0.
    So you could use, for example: Locals.MultidimensionalArray.Type.ArrayDimensions.SetBounds({1,0},{3,4}) to set an array to have three dimensions (1,2,3), each with five elements (0,1,2,3,4).

  • Creating a Two Dimensional Array in Xcode and populating it with a values f

    Whats the easiest way to declare a two dimensional array in Xcode. I am reading an matrix of numbers from a text file from a website and want to take the data and place it into a 3x3 matrix.
    Once I read the URL into a string, I create an NSArray and use the componentsSeparatedByString method to strip of the carriage return line feed and create each individual row. I then get the count of the number of lines in the new array to get the individual values at each row. This will give mw an array with a string of characters, not a row of three individual values. I just need to be able to take these values and create a two dimensional array.

    I'm afraid you are in the wrong place. Look here for the last two forums on programming. However, XCode support is mostly found at developer.apple.com. You can access their forums by registering. Registration is free.

  • Edit Object then saving back causes the object to move??

    Hi,
    I'm using Acrobat X 10.1.6 updated today. When editing PDF documents by right clicking then selecting "Edit Object", I get my usual Illustrator window pop up, change my colour or whatever, Save, back to Acrobat, and the object in question moves! This has only started happening recently and I have been using Acrobat daily in my job, as a PrePress operative, since Acrobat 7 Professional and never had this issue.
    Please advise what is causing the object to move?! I have re-installed Acrobat today and re-updated and no change. I also have several colleagues on various versions of Acrobat ranging from 9.5.3 to 10.1.6 who cannot replicate this issue, even on the same PDF file?
    Many thanks in advance.
    Tom.

    Re-installing Illustrator seemed to work, even though it was fully up to date and now technically it's not, it works better now. I guess I'll be pausing the "updates" from now on.
    Thanks!

  • Three finger or two finger gesture to move back and forward between pages of file only work on safari, unlike with old os. this new lion won't let me do it. Any help?

    three finger or two finger gesture to move back and forward between pages of file only work on safari, unlike with old os. this new lion won't let me do it. Any help?

    I have decided to dedicate this thread to the wonderful errors of Lion OSX. Each time I find a huge problem with Lion I will make note of it here.
    Today I discovered a new treasure of doggie poop in Lion. No Save As......
    I repeat. No Save As. In text editor I couldn't save the file with a new extension. I finally accomplished this oh so majorly difficult task (because we all know how difficult it should be to save a file with a new extension) by pressing duplicate and then saving a copy of the file with a new extension. Yet then I had to delete the first copy and send it to trash. And of course then I have to secure empty trash because if I have to do this the rest of my mac's life I will be taking up a quarter of percentage of space with duplicate files. So this is the real reason they got rid of Save As: so that it would garble up some extra GB on the ole hard disk.
    So about 20 minutes of my time were wasted while doing my homework and studying for an exam because I had to look up "how to save a file with a new extension in  mac Lion" and then wasted time sitting here and ranting on this forum until someone over at Apple wakes up from their OSX-coma.
    are you freaking kidding me Apple? I mean REALLY?!!!! who the heck designed this?!!! I want to know. I want his or her name and I want to sit down with them and have a long chat. and then I'd probably splash cold water on their face to wake them up.
    I am starting to believe that Apple is Satan.

  • Saving two dimensional array to a file

    I am trying to save a two dimensional array to a file.
    If I write a part of the whole array like Filename[1] it works fine.
    But the whole array will cause an Errormessage to appea:
    "cannot find symbol"
    Here is the Code:
      RandomAccessFile output = null;
        try
          output = new RandomAccessFile( "TestPlan.plan", "rw" );
          output.seek( output.length() );       // Dateizeiger an das Ende
          output.write( Karte );  // Zeile schreiben

    Seems that OutputStreamWriter and ByteArrayOutputStream can only handle one dimensional arrays, too.in that case, break down the arrays to single objects, and serialize them individually

  • How can I (neatly) control mouse click events in a multi-dimensional array?

    Hello everyone!
         I have a question regarding the use of mouse clicks events in a multi-dimensional array (or a "2D" array as we refer to them in Java and C++).
    Background
         I have an array of objects each with a corresponding mouse click event. Each object is stored at a location ranging from [0][0] to [5][8] (hence a 9 x 6 grid) and has the specific column and row number associated with it as well (i.e. tile [2][4] has a row number of 2 and a column number of 4, even though it is on the third row, fifth column). Upon each mouse click, the tile that is selected is stored in a temporary array. The array is cleared if a tile is clicked that does not share a column or row value equal to, minus or plus 1 with the currently targeted tile (i.e. clicking tile [1][1] will clear the array if there aren't any tiles stored that have the row/column number
    [0][0], [0][1], [0][2],
    [1][0], [1][1], [1][2],
    [2][0], [2][1], [2][2]
    or any contiguous column/row with another tile stored in the array, meaning that the newly clicked tile only needs to be sharing a border with one of the tiles in the temp array but not necessarily with the last tile stored).
    Question
         What is a clean, tidy way of programming this in AS3? Here are a couple portions of my code (although the mouse click event isn't finished/working correctly):
      public function tileClick(e:MouseEvent):void
       var tile:Object = e.currentTarget;
       tileSelect.push(uint(tile.currentFrameLabel));
       selectArr.push(tile);
       if (tile.select.visible == false)
        tile.select.visible = true;
       else
        tile.select.visible = false;
       for (var i:uint = 0; i < selectArr.length; i++)
        if ((tile.rowN == selectArr[i].rowN - 1) ||
         (tile.rowN == selectArr[i].rowN) ||
         (tile.rowN == selectArr[i].rowN + 1))
         if ((tile.colN == selectArr[i].colN - 1) ||
         (tile.colN == selectArr[i].colN) ||
         (tile.colN == selectArr[i].colN + 1))
          trace("jackpot!" + i);
        else
         for (var ii:uint = 0; ii < 1; ii++)
          for (var iii:uint = 0; iii < selectArr.length; iii++)
           selectArr[iii].select.visible = false;
          selectArr = [];
          trace("Err!");

    Andrei1,
         So are you saying that if I, rather than assigning a uint to the column and row number for each tile, just assigned a string to each one in the form "#_#" then I could actually just assign the "adjacent" array directly to it instead of using a generic object to hold those values? In this case, my click event would simply check the indexes, one at a time, of all tiles currently stored in my "selectArr" array against the column/row string in the currently selected tile. Am I correct so far? If I am then let's say that "selectArr" is currently holding five tile coordinates (the user has clicked on five adjacent tiles thus far) and a sixth one is being evaluated now:
    Current "selectArr" values:
           1_0
           1_1, 2_1, 3_1
                  2_2
    New tile clicked:
           1_0
           1_1, 2_1, 3_1
                  2_2
                  2_3
    Coordinate search:
           1_-1
    0_0, 1_0, 2_0, 3_0
    0_1, 1_1, 2_1, 3_1, 4_1
           1_2, 2_2, 3_2
                  2_3
         Essentially what is happening here is that the new tile is checking all four coordinates/indexes belonging to each of the five tiles stored in the "selectArr" array as it tries to find a match for one of its own (which it does for the tile at coordinate 2_2). Thus the new tile at coordinate 2_3 would be marked as valid and added to the "selectArr" array as we wait for the next tile to be clicked and validated. Is this correct?

  • How to get number of rows and columns in a two dimensional array ?

    Hello,
    What would be the simplest way to get number of rows and columns in a two dimensional array represented as integers ?
    I'm looking for another solution as For...Each loop in case of large arrays.
    Regards,
    Petri

    Hi Petri,
    See a attached txt file for obtaining two arrays with upper and lower index values
    Regards
    Ray
    Regards
    Ray Farmer
    Attachments:
    Get2DArrayIndex.txt ‏2 KB

Maybe you are looking for

  • Intermittent iChat audio input problem

    Hello all, One client has an Intel Mac mini (Macmini3,1) with an external iSight camera running 10.6.7. We can be having an audio or video conference, or a screen sharing session, and it will work fine for a long time.  After a while though, for reas

  • WIM Integration with MS Dynamic CRM

    I have the below query on WIM 9.x 1. How to send the chat transcript or any information to MS Dynamic CRM 2. Search a CRM record from WIM GUI and tag the current chat transcript to CRM Appreciate if anyone can help me on this. Thanks in advance. Rohi

  • JTable disable editing, row selecion

    hii all, i want to disable the cell editing in the JTable and select a complete row. i tried with more than a way but faild.

  • Can Not Install New Zone

    I am encountering an issue with installing a new zone. I can complete the configuration i try to do the install and it returns the errors: # zoneadm -z test install ERROR: No such file or directory: cannot resolve path </etc/default/lu> ERROR: cannot

  • Editing Red Footage in premiere help

    Hi,   Finally, I decided to edit red footage in Premiere cs6 this is my first edit can any one plz help how to Edit red footage,i mean red is a raw footage,am i first grade(basic color correction) the footages or edit the footage  (my confusion) and