recursion base (triangles of a single line)

I have the following code:

import flash.display.MovieClip;

var barMC:bar = new bar();

var barMC2:bar = new bar();

var barMC3:bar = new bar();

var container: MovieClip = new MovieClip();

container.addChild (barMC);

container.addChild (barMC2);

container.addChild (barMC3);

Container.x=stage.stageWidth/2;

Container.y=stage.stageHeight/2;

addChild (container);

barMC2.rotation =-60;

2 * barMC3.width barMC3.y = - Math.sqrt (3);

trace (barMC3.y);

barMC3.x=barMC3.width/2;

barMC3.rotation = 60;

var myArray:Array = new Array();

container.scaleX = 4;

for (var i: int = 4; i > 0; i--) {}

myArray.push (container);

container.scaleX=container.scaleX/i;

container.scaleY = container.scaleX;

trace (Container.ScaleX);

stage.addChild(myArray[4-i]);

trace(myArray[4-i].) ScaleX);

trace(4-i);

}

How can I get the recursion to display?  Right now it shows only the last triangle iterates.

I do not expect it... in fact I expect to only show the first creation since this time around you reassign the container to be a new movieclip (empty) in each loop turn.  Are you under the impression that using addChild creates new instances?  It isn't... just of taking an existing instance and place at the top of the display list.

In your first version you were taking the same instance store references to it in a table... then move one instance or resizing it. so the most recent changes were all that were seen when he finished.

In this version, you are to abandon it and adding empty movieclips in the table... you won't see them.

What you should do is to create four different containers at the beginning of the code rather than just one.

Tags: Adobe Animate

Similar Questions

  • converting and application of single line

    Greetings,

    The data tables and release date are on the bottom.
    Tables of process contains the id of the base of different dealing with the fabric. 1 single command will have (at most) 2 or 1 process different store (s). Need to create a query list all order no as well as names of processes, work shop. It also requires to convert each numeric field to 0 if the value is null. I was able to create a query as follows but stuck on do not know how the order number listed as single line more this conversion of numeric field when there are 2 different process no.. Can you help me? I know there are a lot of gurus here who can give me a lift. Thank you.

    Select
    B.porderno,
    Decode(pprocessno,1,A.Name,null) as '1 storename. "
    Decode(pprocessno,2,A.Name,null) as '2nd storename.
    Decode (pprocessno, 1, NVL(B.PLength,0), null) as "1 length."
    Decode (pprocessno, 2, NVL(B.PLength,0), null) as '2nd length.
    of test_store2 A, test_process B
    where A.storeid = B.pstoreid...



    CREATE TABLE test_store2
    (storeid NUMBER (3.0) not null,)
    (20) is not name VARCHAR2 null,
    addr VARCHAR2 (30) not null

    )
    /
    CREATE TABLE test_process
    (porderno NUMBER (10,0) not null,)
    pstoreid number (3.0) not null,
    pprocessno number (3.0) not null,
    PLength number (3.0).
    pwork VARCHAR2 (30)

    )

    /
    INSERT INTO test_store2 (storeid, name, address)
    VALUES (001, 'papas, 123 route1')
    INSERT INTO test_store2 (storeid, name, address)
    VALUES (002, "tcbi" ', ' st 652 sky ")
    INSERT INTO test_store2 (storeid, name, address)
    VALUES (003, 'tutu club' ', ' 888 grand ave ")
    INSERT INTO test_store2 (storeid, name, address)
    VALUES (004, "stinkys', ' 432 bobo st")
    /

    INSERT INTO test_process (porderno, pstoreid, pprocessno, plength, pwork)
    VALUES (811, 2, 1, null, "prepNdye")
    INSERT INTO test_process (porderno, pstoreid, pprocessno, plength, pwork)
    VALUES (811, 1,2,30, "cutting")

    INSERT INTO test_process (porderno, pstoreid, pprocessno, plength, pwork)
    VALUES (812, 1,1,10, 'dye')

    INSERT INTO test_process (porderno, pstoreid, pprocessno, plength, pwork)
    VALUES (813, 3,1,40, 'preparation')
    INSERT INTO test_process (porderno, pstoreid, pprocessno, plength, pwork)
    VALUES (813, 4.2, null, 'dye')
    /
    Search result page layout
    order  1st storename 2nd storename      1st length    2ndlength         1stwork            2nd work
    
    811     tcbi                papas             0             30            prepNdye           trimming
    812     papas                                 10             0            dye
    813     tutu club           stinks            40             0            prep               dye

    Hello

    I wanted to answer the OP, not Florian. I'm sorry.

    In your [last thread | http://forums.oracle.com/forums/message.jspa?messageID=3514404#3514404], we have treated the two stores as if they were in the two tables, using two copies of the test_store2 table.
    We can do the same thing with the process: the two process, as if they were in the two tables, using two copies of the process table.
    Since it may not be a 2nd treatment, the 2nd copy of the table of alternation (and the second copy of the table test_store2, which is distal in relation to it) must be attached to an outside.

    SELECT    p1.porderno
    ,       s1.name          AS "1st storename"
    ,       s2.name          AS "2nd storename"
    ,       NVL (p1.plength, 0)     AS "1st length"
    ,       NVL (p2.plength, 0)     AS "2nd length"
    ,       p1.pwork             AS "1st work"
    ,       p2.pwork             AS "2nd work"
    FROM            test_process     p1
    JOIN            test_store2     s1     ON     p1.pstoreid     = s1.storeid
                               AND     p1.pprocessno     = 1
    LEFT OUTER JOIN     test_process     p2     ON     p1.porderno     = p2.porderno
                                     AND     p2.pprocessno     = 2
    LEFT OUTER JOIN     test_store2     s2     ON     p2.pstoreid     = s2.storeid
    ORDER BY  p1.porderno
    ;
    

    Another approach, since you want to exit with a line by porderno, would be to start by creating a version of the process table that has one line per processid, using GROUP BY, as Florian, and then join two copies of the table of test_sorte2 this result set.

    Published by: Frank Kulash, June 9, 2009 10:45

  • How to set up single-line message headers?

    Previously, in the message display area, I had configured Thunderbird so that a message appears that the subject of the message in the message header section just above the body of the message. But I just upgraded to to 38.1.0 and now I have in reserve, [address], in the header box, although I've seen-> headers-> Normal (Compact) set.

    Please tell us how to get back to the option just to display the subject line. Real estate vertical display is much too precious to not having the capacity of the old view of a single line.

    Thank you
    [email protected]

    Install this add on.

    https://addons.Mozilla.org/en-us/Thunderbird/addon/compactheader/?src=HP-DL-featured

    The normal headers view removes the routing information only. It has nothing to do with what you are trying to accomplish.

  • When you type an e-mail, when I go to the next line, it jumps two lines instead of a single line. How can I fix it?

    I was typing an email and when I would go to the next line, it will skip two lines instead of a single line. How can I fix the problem?

    I'm not sure that you understand the problem. Could include a screenshot of it just after what happens?

    If you need help to create a screenshot, please see How to make a screenshot of my problem?

    Once you have done so, attach the file to screen shot saved to your post on the forum by clicking on the button Browse... under the box to post your reply . This will help us to visualize the problem.

    Thank you!

  • How can I add a spell checker this spelling laurys for a single line?

    I want a spell checker that checks my spelling for just a single line. For example, Ebay feedback is only one line long then how I spell check my typed in response? Thank you.

    You can do this by changing a hidden preference

    1. Type of topic: config in the address bar and press on enter, accept the message of warning that is displayed and you will be taken to a list of preferences
    2. In the upper search box, type out, will you limit the results to a small number of preferences
    3. Double-click the layout.spellcheckDefault preference and change its value to 2, which will allow the spell on simple lines

    See http://kb.mozillazine.org/Layout.spellcheckDefault for more details about this preference

  • How can I get the tabs to go on a single line and a menu of Firefox?

    Firefox allows to have 2 lines above - Firefox menu with tabs and more and another line of the navigation toolbar. during the installation of some programs online, Firefox now have 3 lines at the top, with the Firefox menu on an entire line, the 2nd line of tabs and 3rd line of navigation toolbar. How can I get the tabs to go on a single line and a menu of Firefox?

    With the current versions of Firefox, you can choose to use the menu of Firefox (orange in windows; gray Linux) button at the left end of the Windows title bar or bar menus familiar as in earlier versions. The Firefox button is displayed by default only in Windows Vista and Windows 7, but you can turn on or off or switch between the two or temporarily show the menu bar when the Firefox button is displayed.

    If you chose to use the Firefox button and you use the default tabs on top, the tab bar will move to the title bar with the Firefox button only when you are to maximize window (the ' square' the middle button in the upper right corner of the Windows standard application window). Other selected toolbars will be displayed below that (bar Navigation, Bookmarks Toolbar and the toolbars you add via Add - ons).

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

    Not related to your question, but...

    You must update some plug-ins:

  • I fill out an application online for the school. Is it possible to configure Firefox to check the spelling in a single-line text box without having to right click each time?

    I want to be able to set the spell checker to occur automatically, even for single-line text boxes.

    You can set the pref layout.spellcheckDefault to 2 on the topic: config page to perform spell checking on line and unique multi line text fields.

    To open the topic: config page, type Subject: config in the address bar (address) and press the 'Enter' key, as you type the url of a Web site to open a Web site.

    If you see a warning then you can confirm that you want to access this page.

    • Use the filter at the top bar of the on: page config to more easily spot a preference.
    • Preferences that have changed see the bold (user set).
    • Preferences you can restore the default value or change via the context menu.
  • I would like to organize my toolbars to fit on a single line

    I have so many toolbars, some are really short and I wish I could move them if the courts fit on a single line.

    You are welcome.

    Please click the button of resolved next to the answer that solved your problem of Firefox support, when you are connected.

  • How can I "automate" a question of a single line and response? the answer starts with the right margin and ending on the right margin as it is typed. The sequence would be: 1 type question 2. Tab at the right margin. 3 type the answer ending on the margin

    5.6.1 MacBook early 2015 OS X 10.11.3 pages

    Question: How can I easily format a series of "a line of questions / answers" (questions and answers on the same line.)

    How to easily create a long series of a single line of questions and answers to the question aligning it on the left and the end of the response by aligning right?

    For example

    !. Type the short question on the left margin.

    2. tab at the right margin.

    3. type the answer with the end of the answer on the right margin.

    Insert a right tab at the right margin.

    Peter

  • Arrow keys serve page upwards or downwards instead of the single line upward or down, can't change it back.

    Keyboard up and down arrows use page up/page down instead of the single line up/down keys. I can't find how to change their return.

    This has happened

    Each time Firefox opened

    is my last installed update

    Maybe you turned Caret browsing. Press F7 and see if this is fixed.
    http://KB.mozillazine.org/accessibility.browsewithcaret

  • Graphics problems with a single line at the top.

    During bootup until I perfect video resolution, but after starting windows I have a single line of the video of the ideas would be useful. I already checked the wiring, video card and the BIOS settings. Anyone had this problem? This had beat me my head against the wall for a week now.

    I'm just guessing that you have a problem with
    your video driver. Maybe the info will be
    be useful...

    Good luck...

    What happens if you start in Mode safe?

    (315222) a Description of the Safe Mode
    Boot into Windows XP options
    http://support.Microsoft.com/?kbid=315222

    How to start safe mode in Windows XP
    http://bertk.MVPs.org/html/SafeMode.html

    If you start correctly in safe mode... it can
    be worth a try to roll back your video driver.

    (306546) HOW to: use the driver to restore roll back feature
    a previous Version of a device in Windows XP driver
    http://support.Microsoft.com/default.aspx?scid=kb;en-us;306546

  • Reading single line of the text file

    I use the following code to read a .txt file

    private String readTextFile (String fName) {}
    String result = null;
    FileConnection fconn = null;
    DataInputStream is = null;
    try {}
    fconn = (FileConnection) Connector.open (fName, Connector.READ);
    is = fconn.openDataInputStream ();
    Byte [] = IOUtilities.streamToBytes (is) data;
    result = new String (data);
    } catch (IOException e) {}
    System.out.println (e.getMessage ());
    } {Finally
    try {}
    If (null! = is)

    is. Close();
    If (null! = fconn)
    fconn. Close();
    } catch (IOException e) {}
    System.out.println (e.getMessage ());
    }
    }
    return the result;
    }

    I want to print a single line instead of the file around so I read that I need to store the contents of the file into an array and then get the index of the line. Problem is that I couldn't find any information on how to do it. Can someone give me a shot. Thanks in advance.

    This isn't a problem with encoding. You just need to do a little extra accounting and adjust start and end indices to remove these characters. To treat the "\r\n" of line termination style, you can maintain a flag (initially false) to indicate that the previous line ended with a \r; If a line begins with \n, it should be treated as the end of a line (empty) if the flag is true (in which case it should be ignored).

    If you want to extract all lines (not just the first), then it may be easier to do this accounting while avoiding a separate function. Something like this (untested):

    // read the file into a byte array 'data'; then:
    Vector lines = new Vector();
    boolean endCR = false;
    int start = 0;
    for (i = start; i < data.length; ++i) {
      if (data[i] = 0xD) {
        lines.addElement(new String(data, start, i - start));
        endCR = true;
        start = i + 1;
      } else if (data[i] = 0xA) {
        if (endCR && i == start) {
          start++;
          endCR = false;
        } else {
          lines.addElement(new String(data, start, i - start));
          start = i + 1;
        }
        endCR = false;
      }
    }
    String[] results = new String[lines.size()];
    lines.copyInto(results);
    
  • You can disable a single line within the ACL?

    We have 881g on 15.1 code with a ZBFW.

    In an ACL, ip access list extra blah, with several lines, 10,20,30, etc... is there a way to disable a single line or make it inactive any leaving it in the config? He can't see in there, don't know if it is not possible or I'm not looking for the good things.

    Thank you!

    There is no "inactive" as on the ASA. An entire book would be to do something like

    Note allowed tcp any any smtp log set EQ

    It keeps things in the config, but it does nothing since it is a comment.

  • Arrow line (single line with an arrowhead) in MS Paint Win7

    Is there anyway that I can draw an arrow line (straigt single line with an arrowhead at the end) in the new MS Paint in Win7?

    The following items may be worth a visit:

    Windows 7 - paint help
    http://Windows.Microsoft.com/en-us/Windows7/using-paint

    Windows 7 - getting started with paint - tutorial
    http://Windows.Microsoft.com/en-us/Windows7/getting-started-with-paint

    Windows 7 - How to add an arrow to a screenshot
    http://www.allsandiegocomputerrepair.com/693/how-to-add-an-arrow-to-a-screenshot/

  • Text single line with background Image field

    Hello

    I have the following requirement for a small number of topics on BasicEditField, but I couldn't find answers to my requirement, so post to the same

    My requirement

    1 must be the only editor of line text field with a width and a predefined height.

    2. If a background Image(For better look-rounded edge image like in Broswer)

    3. If the number of characters exceeds the single line, it has scroll horizontally right and from characters to scroll left with the appropriate property of the ellipse.

    4. in entering an Enter key (Center of select navigation Keys), it should call my method to perform an action.

    Enjoy a quick help on this

    Thanks in advance

    Q1. BasicEditField.NO_NEWLINE will stop people pressing enter and get a new line.

    Regarding your second question, I recommend that you check out the two videos on screens and area managers.

    As a general rule, a field is laid out (i.e. tells his manager what size he needs and then this rectangle is placed), then painted.  Exhibitor is managed by managers and put sublayout on the page for the fields.  The more important than sublayout and put thing in page do is specify the scope (width and height) they need, which fiddles and managers to make using the measure.

    Once all fields was laid out, then the visible parts of each field are painted using paint.  I've never used subpaint.

    I hope this helps.

Maybe you are looking for

  • night shift iOS 9.3 does not work in mode

    SO this is my first post This new functionality is good and only time will tell if it works with my sleep pattern. The only thing that bothers me is - you have activated of night shift, but when you hit that 20 percent mark where it prompts you to ac

  • Can I simulate VirtualBench in Max?

    A few months ago, I submitted a draft with a VirtualBench LabVIEW. Now, I want to come back and work on the project but I have no VB and can't seem to understand how to simulate it in MAX?

  • Lights flashing on HP 6940

    I just replaced the carridge of black ink on my HP 6940, with the same ink cartridge #, and after I close the lid, I get the flashing lights on the power light, State and light black ink cartridge.  I tried to reinstall the cartridge several times wi

  • When Vista starts, get error message about window\system32\igfxpers.exe

    I have a message to start my computer! It is said that the following file is correctly entered... window\system32\igfxpers.exe... What should I do?

  • Win 7 now fails Genuine Advantage test! Classified counterfeit

    I bought a Lenovo X200s's with Windows 7 preinstalled direct and a Win 7 ca on that label. Yesterday, I was informed that Win 7 is not authentic and that I'm a victim of counterfeiting. I had just installed the latest updates of the system update Thi