addChild (new button()) - how to add a name to this new created button

Hello

Lost my old username, I've been Pluda, now exPluda?

Tring well, use a loop to add buttons to my work, but should refer to their names so I can have diferent x positions for each. How to do this?

for (var sm:uint = 0; sm < sub_menus.length; sm ++) {}
hsm.addChild (new bt_sub_menus());
HSM.bt_sub_menus.x = hsm.x - 10;
HSM.bt_sub_menus.y = hsm.bt_sub_menus.height + sm * 15;

}

This does not work, I just get a button placed where I want.

Thank you!

1. go to the faq section of the forum and send a private message to one of the admins to let them know.  they are very conscientious and helped me when my original kglad id has been changed in kglad-HNsomethingorother.

2.

for (var sm:uint = 0; sm< sub_menus.length;="" sm="" ++="" )="">

var btn:bt_sub_menus = new bt_sub_menus()
hsm.addChild (btn);
BTN.x = hsm.x - 10;
BTN.y = hsm.bt_sub_menus.height + sm * 15;

}

Tags: Adobe Animate

Similar Questions

  • How to add the name of the title of graph in Excel

    Dear friends

    I'm using LabVIEW 8.0.I need how to add the name of the title of graph in Excel.

    You have the report generation tool? If so, the VI of graph Easy Excel has an entry for this.

    If you don't have the Toolbox, then you need to use ActiveX. Please do a search on the use of the ActiveX (there are examples provided with LabVIEW) to control Excel. Also, there are many examples in the thread Excel. NOTE: DON'T POST QUESTIONS IN THIS THREAD.

    In the end, you will need to search for information contained in MSDN.

  • How to add dynamic names to MC in AS3?

    Hello

    I am trying to create a script simple enough image for a flash site. What it does is create a container named mc and then load a picture in the mc of XML. It traverses the XML file as in a loop for each. But the problem I have is that each container image then gets the name mc. So now when I try to compile the function that allows to press one of the containers image to enlarge, it is the last great picture because it's the last of them to be created with the name mc. So, how can I give each movieclip that I create a different name as mc1, mc2 etc.

    This is my XML:

    <? XML version = "1.0" encoding = "utf-8"? >

    < entries >

    < Entry >

    < phpText > title < / phpText >

    IMG/500.png < image > < / image >

    < phpWidth > 500 < / phpWidth >

    < phpHeight > 400 < / phpHeight >

    < / Entry >

    < Entry >

    < phpText > title 3 < / phpText >

    IMG/300.png < image > < / image >

    < phpWidth > 300 < / phpWidth >

    < phpHeight > 900 < / phpHeight >

    < / Entry >

    < Entry >

    < phpText > Title2 < / phpText >

    IMG/1440.png < image > < / image >

    < phpWidth > 1440 < / phpWidth >

    < phpHeight > 900 < / phpHeight >

    < / Entry >

    < Entry >

    < phpText > title < / phpText >

    IMG/500.png < image > < / image >

    < phpWidth > 500 < / phpWidth >

    < phpHeight > 400 < / phpHeight >

    < / Entry >

    < / input >

    AS3 code:

    import flash.events.Event;

    Import fl.text.TLFTextField;

    import flash.text.TextFieldAutoSize;

    import flash.text.TextFormat;

    import flash.display.Sprite;

    import flash.display.MovieClip;

    var iX:int = 15;

    var iY:int = 15;

    var tX:int = 15;

    var tY:int = 100;

    var id: int = 0;

    var urlRequest:URLRequest = new URLRequest ("data.xml");

    var urlLoader:URLLoader = new URLLoader();

    urlLoader.addEventListener (Event.COMPLETE, urlLoaded);

    urlLoader.load (urlRequest);

    function urlLoaded(e:Event) {}

    If {(urlLoader.data)

    var entriesData = new XML (urlLoader.data);

    var entries = entriesData.entry;

    for each {(var entrée: XML entrées)}

    Add variables

    Shall var = entry.image;

    var oText = entry.phpText;

    var oWidth = entry.phpWidth;

    var oHeight = entry.phpHeight;

    Create image GraphHolder

    var cont = ["mc" + id];

    var mc:MovieClip = new MovieClip();

    mc.graphics.beginFill (0xffffff);

    mc.graphics.drawRect (0, 0, oWidth, oHeight);

    mc.graphics.endFill ();

    MC.x = iX;

    MC.y = iY;

    this.addChild (mc);

    Add images to the GraphHolder

    var urlReq1:URLRequest = new URLRequest (shall);

    var urlLoad1:Loader = new Loader();

    urlLoad1.load (urlReq1);

    mc.addChild (urlLoad1);

    MC. Width = 100;

    MC. Height = 80;

    mc.addEventListener (MouseEvent.CLICK, onClickHandler);

    var origX = mc.x;

    var origY = mc.y;

    function onCloseHandler(myEvent:MouseEvent) {}

    MC. Width = 100;

    MC. Height = 80;

    MC.x = origX;

    MC.y = origY;

    myTextField.visible = true;

    mc.removeEventListener (MouseEvent.CLICK, onCloseHandler);

    }

    function onClickHandler(myEvent:MouseEvent) {}

    If {(oWidth > 1060)

    var allowedW = oWidth - 1060;

    oWidth = oWidth - allowedW;

    oHeight = oHeight - allowedW;

    }

    If {(oHeight > 700)

    var allowedH = oHeight - 700;

    oWidth = oWidth - allowedH;

    oHeight = oHeight - allowedH;

    }

    myTextField.visible = false;

    var picPosX = 1100 - oWidth;

    var picPosY = 730 - oHeight;

    MC.x = (picPosX / 2)-194;

    MC.y = (picPosY / 2)-148;

    MC. Width = oWidth;

    MC. Height = oHeight;

    mc.addEventListener (MouseEvent.CLICK, onCloseHandler);

    }

    Format textfield

    var myFormat:TextFormat = new TextFormat();

    myFormat.color = 0 x 000000;

    myFormat.font = "Arial";

    myFormat.size = 13;

    Create new textfield

    var myTextField:TextField = new TextField ();

    myTextField.width = 100;

    myTextField.x = tX;

    myTextField.y = tY;

    myTextField.selectable = true;

    myTextField.type = TextFieldType.DYNAMIC;

    myTextField.multiline = false;

    myTextField.border = false;

    myTextField.wordWrap = false;

    myTextField.autoSize = TextFieldAutoSize.CENTER;

    myTextField.defaultTextFormat = myFormat;

    Add text to a textfield

    myTextField.text = oText;

    Add textfield

    addChild (myTextField);

    iX = iX + (mc.width + 15);

    tX = tX + (mc.width + 15);

    If {(iX > 650)

    iX = 15;

    iY = iY + 115;

    tX = 15;

    tY = tY + 115;

    }

    }

    }

    }

    Very grateful for the help!

    Best,

    Linus

    In the features that your buttons/mcs call when they get clicked is where you can use the event.currentTarget to target the.  Points to the object that was clicked event.currentTarget which has the event listener are entrusted to him.

  • How to add the name of a program in the AutoPlay menu? __In win xp, I used 'TweakUiPowertoySetup '; is there a program like that?

    Add in the name of a program in the Autoplay menu.

    Hi shayangh,

    You can use the 'default Programs editor' (third-party tool) to add / change AutoPlay entries.
    http://www.Winhelponline.com/blog/default-Programs-editor-file-association-editor-for-Windows-7-and-Vista/
    Ramesh Srinivasan, Microsoft MVP [Windows Desktop Experience]

  • How to add an icon to the application created by the user to the e-mail toolbar

    I have a new Mac Mini, Mac Mail and El Capitan 10.11.4. I would like to add an icon to the mail toolbar to trigger an application I wrote. I tried the steps for "Finder" and who works for "Finder", but I want it on the toolbar "Mail". Can it be done? If so, how?

    BTW, I'm a professional programmer.

    I requisted you post be moved here:

    Developer forums

  • How to add prefixes to namespace to XMLType created from object?

    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE 11.2.0.3.0 Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    

    I work with SOAP request the creation of a pattern of derived Types.

    Consider the following annotated schema registration (I wanted Oracle to create types for me, but with my own names):

    exec dbms_xmlschema.deleteSchema(schemaURL => 'Parameters4.xsd');
    
    declare
    v_xsd xmltype := xmltype('<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
               xmlns:oraxdb="http://xmlns.oracle.com/xdb"
               xmlns = "http://www.cognera.com"
               targetNamespace = "http://www.cognera.com">
      <xs:element name="Parameters" oraxdb:SQLName="Parameters" oraxdb:SQLType="Parameters">
        <xs:complexType oraxdb:SQLType="Parameters">
          <xs:sequence>
            <xs:element name="Param1" type="xs:string" oraxdb:SQLName="Param1" oraxdb:SQLType="VARCHAR2" />
            <xs:element name="NestedItems" oraxdb:SQLName="NestedItems" oraxdb:SQLType="NestedItemsType">
              <xs:complexType oraxdb:SQLType="NestedItemsType">
                <xs:sequence>
                  <xs:element name="NestedItem" type="NestedItemType" oraxdb:SQLName="NestedItem" oraxdb:SQLType="NestedItemType"/>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:complexType name="NestedItemType" oraxdb:SQLType="NestedItemType">
        <xs:sequence>
          <xs:element name="nParam1" type="xs:string" oraxdb:SQLName="nParam1" oraxdb:SQLType="VARCHAR2"/>
          <xs:element name="nParam2" type="xs:string" oraxdb:SQLName="nParam2" oraxdb:SQLType="VARCHAR2"/>
          <xs:element name="nParam3" type="xs:string" oraxdb:SQLName="nParam3" oraxdb:SQLType="VARCHAR2"/>
        </xs:sequence>
      </xs:complexType>
    </xs:schema>
    ');
    begin
      dbms_xmlschema.registerSchema(schemaURL => 'Parameters4.xsd', --this name is local to each ERS schema.                                 
                                          schemaDoc => v_xsd,
                                          local => TRUE,
                                          genTypes => TRUE, --only want the types
                                          genbean => FALSE,
                                          genTables => TRUE, --not sure if I need this
                                          force => TRUE,
                                          owner => user);
    end;
    /
    

    The types created were:

    CREATE OR REPLACE TYPE "NestedItemType" AS OBJECT ("SYS_XDBPD$" "XDB"."XDB$RAW_LIST_T","nParam1" VARCHAR2(4000 CHAR),"nParam2" VARCHAR2(4000 CHAR),"nParam3" VARCHAR2(4000 CHAR))NOT FINAL INSTANTIABLE
    /
    CREATE OR REPLACE TYPE "NestedItemsType" AS OBJECT ("SYS_XDBPD$" "XDB"."XDB$RAW_LIST_T","NestedItem" "NestedItemType")FINAL INSTANTIABLE
    /
    CREATE OR REPLACE TYPE "Parameters" AS OBJECT ("SYS_XDBPD$" "XDB"."XDB$RAW_LIST_T","Param1" VARCHAR2(4000 CHAR),"NestedItems" "NestedItemsType")FINAL INSTANTIABLE
    /
    

    I found that to build these types using constructors (to avoid the PLS-00306: wrong number or types of arguments in the call to 'NestedItemType'), that I needed to change these types (drop the xdb magic):

    CREATE OR REPLACE TYPE "NestedItemType" AS OBJECT ("nParam1" VARCHAR2(4000 CHAR),"nParam2" VARCHAR2(4000 CHAR),"nParam3" VARCHAR2(4000 CHAR))FINAL INSTANTIABLE
    /
    CREATE OR REPLACE TYPE "NestedItemsType" AS OBJECT ("NestedItem" "NestedItemType")FINAL INSTANTIABLE
    /
    CREATE OR REPLACE TYPE "Parameters" AS OBJECT ("Param1" VARCHAR2(4000 CHAR),"NestedItems" "NestedItemsType")FINAL INSTANTIABLE
    /
    

    I read on the forums of a hack to get a space of names added to the output:

    CREATE OR REPLACE TYPE "Parameters" AS OBJECT ("@xmlns" VARCHAR2(4000), -- namespace attribute HACK
                                                           "Param1" VARCHAR2(4000 CHAR),"NestedItems" "NestedItemsType")FINAL INSTANTIABLE
    /
    

    Putting it all together, I have:

    DECLARE
      v_Parameters    "Parameters";
      v_xml           xmltype;
      v_print_output  clob;      
    begin
      v_Parameters :=  "Parameters"('www.cognera.com',
                                    'hello',
                                  "NestedItemsType"("NestedItemType"('one',
                                                                 'two',
                                                                 'three'
                                                                )
                                                 )
                                 );
        
      v_xml := xmltype(xmlData => v_Parameters);
    
      select xmlserialize(document
                          xmlquery('declare namespace soap = "http://www.w3.org/2003/05/soap-envelope";                                                              
                                    declare namespace cognera = "http://www.cognera.com";
                                    <soap:Envelope>
                                       <soap:Header/>
                                       <soap:Body>
                                         {/}
                                       </soap:Body>
                                     </soap:Envelope>
                                   ' passing v_xml returning content) as clob
                          indent size=2
                         ) into v_print_output from dual;
      dbms_output.put_line(v_print_output);
    end;
    

    This generates:

    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
      <soap:Header/>
      <soap:Body>
        <Parameters xmlns="www.cognera.com">
          <Param1>hello</Param1>
          <NestedItems>
            <NestedItem>
              <nParam1>one</nParam1>
              <nParam2>two</nParam2>
              <nParam3>three</nParam3>
            </NestedItem>
          </NestedItems>
        </Parameters>
      </soap:Body>
    </soap:Envelope>
    

    What I really want is:

    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:c="www.cognera.com">
      <soap:Header/>
      <soap:Body>
        <c:Parameters>
          <c:Param1>hello</c:Param1>
          <c:NestedItems>
            <c:NestedItem>
              <c:nParam1>one</c:nParam1>
              <c:nParam2>two</c:nParam2>
              <c:nParam3>three</c:nParam3>
            </c:NestedItem>
          </c:NestedItems>
        </c:Parameters>
      </soap:Body>
    </soap:Envelope>
    

    How can I do this without having to add to the namespace using the custom XQuery function?

    Both outputs are semantically equivalent.

    Why do you need one?

  • DVD Maker... How to add other files in an already created DVD

    Home Premium SP2

    I created a DVD using Windows DVD Maker in a rewritable DVD.
    How can I add several files into it?
    It was just still images in the DVD.
    Thank you.

    t-4-2

    After you create a video DVD you can not change it.

    Thank you.
    I found a way... save the project as MSDVD after DVD is created.

    t-4-2

  • How to add text in acrobat pro and create space in the document so that's the part of the original text

    is it possible to add text between already existing as PDF text?

    Not at all practical. Change the original, never the PDF document unless the sky fell, the original is lost and cannot be done for money, and all backups have been eaten by termites.

  • How to add a condition to this statement.

    Hi friends,

    I have a requirement of the customer.

    Let me explain the scenario.

    I have a table, which contains some employees say 1, 2,3,4.


    So I wrote a query so that it...

    Select * from where a trunc (sysdate) between effective_start_date and effective_end_date person_id =: p_person_id;

    in this statement, I would like to add a condition more say

    If person_id in (1,2,3,4) then
    p_person_id: = null;
    on the other
    p_person_id = person_id;

    the addition of this condition in mysql statement...

    can someone help me with this...

    Thanks in advance.

    Hello

    Looks like that (no data, not yet tested)

    select * from A
     where trunc(sysdate) between effective_start_date and effective_end_date
       and person_id = CASE
                          WHEN NOT :p_person_id in (1,2,3,4)
                          THEN :p_person_id
                          ELSE person_id
                       END;
    

    Concerning
    Peter

  • How to add plugins to phonegap application that created by desktop PHONEGAP?

    Please help me

    I'll use the Phonegap Build cloud service but the app I made on-site

  • How to add a PPR to the button when running

    Hi all
    I have a text named "status" entry and it has links to this method
          public void setStatus(RichInputText status) { 
            setCurrentRecordStatus((String)status.getValue());
            System.out.println("status value is"+(String)status.getValue());
            status.setAutoSubmit(true);
            this.status = status;
        }
    And I have the "submitBtn" command button and I set the disable property to this method
          
        public boolean isDisableSubmitButton() {
          if (getCurrentRecordStatus() == "E") {
              disableSubmitButton=false;
          } else {
             disableSubmitButton = true;
          }
            return disableSubmitButton;
        }
    
        public void setCurrentRecordStatus(String currentRecordStatus) {
            this.currentRecordStatus = currentRecordStatus;
        }
    
        public String getCurrentRecordStatus() {
            return currentRecordStatus;
        }
    I want to put the partial "trigger" property of the command key is the id of the input text 'status' when running so that the property enable and disable the Refresh button.

    I can't do this design-time for many reasons, one of them is that the button is on the template and the content of the page changes after menu selection.

    My question is: how to add a PPR to this button during execution?
    Help, please
    Thank you

    Hello

    Try like this I hope this helps.

    for example:

    Jspx page:





    At the bean:

    private RichPopup * bindpopUp *;

    public String testmMethod() {}
    AdfFacesContext.getCurrentInstance (.addPartialTarget(*bindpopUp*));
    Returns a null value.
    }

    * Note :*

    Add partialsibmit if you use all the action in the component.

    Remove the partial triggers in the page, if you gave for the same component in the managed Bean. Add target partial bean or in the page... in a place...

    Kind regards
    Guillet

  • How to get the name of the particular index table option.

    Hello

    Can any body tell how to get the name of the item to a particular array.i have a table within array.i must compare the name of Francesca in particular key.here is the table.

    myArray= Array (@43b1e09)
    [0] = object (@42b33f9)
    Testing_1 = Array (@4428821)
    [0] = object (@43adc19)
    choice_id = '0 '.
    delete = "N".
    DownloadURL = "xyz".
    selected = 'Y '.
    translation = "2_486."
    length = 1
    length = "N".
    Editable = 'Y '.
    field_id = '388 '.
    LanguageLink = 'Y '.
    linked_definition_id = null
    multiple values = "N".
    name = "Photo".
    otheroption = "N".
    photovitlink = object (@43ad0d9)
    required = "N".
    step = '1 '.
    translation = "Photo".
    visible = 'Y '.
    [1] = object (@43ad5d9)
    [2] = object (@4490089)

    Here is the structure of the table I get server side.i give table name of result as table myArray.This have several child as an object of object.each having .i table (Testing_1 in the first case) must get the name of this Testing_1 table and compare with my sort key that I perform an operation. But I am unable to get the name of this Testing_1 array(Since_it_is_dynamic_so_this_name_changes_some_times).can a body guide me how to get the name of this table.



    Thanks and greetings

    Vineet Sharma

    Hi Vineet Osho,

    You can browse your object using the loop and you can get the name of the table... as below...

    for each (var obj:Object in myArray)
    {
    for (var str:String in obj)
    {
    If (obj [str] is array)
    {
    var arrayName:String = str;
    }
    }
    }

    Thank you

    Jean Claude

  • How can I add a name to the face?

    In Photos 1.5, El Capitan 10.11.5, how can I add a name to a face that is not recognized by the software of pictures (because it is cut by the framework)?

    -Gil

    Oops!  I found this: Ctrl-click on the editable version and pops up a menu... Get Info has a button "Add Faces".

  • With CVI SQL Toolkit, how to add the new variable param column in a table.

    Dear all:

    I used the CVI Sql toolkit to create a database, but now I don't know how to add a new column to a table in variable param.

    I know, to add a column with the name of constant column could be down by below:

    DBImmediateSQL ((hdbc, "alter table table1 add column1 char [100]");

    But if Column1 is a param variablae how can I write the code? Please advise?  It will be appreciated if you could give me an example.

    Best regards!

    HI -.

    If you look at the parameters that you pass to the SQL function, you can see that the second parameter is a string constant. In your code, you can create an array of characters (string). You can then use sprintf to programmatically determine what will be the contents of this variable. In the function call, you can put the variable instead of the literal string, and you will have a customizable SQL statement.

    Hope this helps-

    John M

  • Where can I find out how to add a new contact in windows Live Mail?

    Original title: Live Mail help

    I'm new to Microsoft Live Mail.  Where can I activate using simple?  For example, where can I find out how to add a new contact?

    There is a little blue ? the question mark button in the top right, which will take you to page here to help Windows Essentials.  You can discover all the tutorials available.

    To add a contact, click Contacts on the left, then click on 'new contact' on the toolbar.

Maybe you are looking for