How to Position of a dynamically created child symbol.

Hello Everyone,
I created symbols instances on the stage by
for(alpha = 0; alpha < 5; alpha++)
    sym.createChildSymbol("rect", "Stage");
Now I wanted to set the position of each symbol  - The probelm is I don't know the names of the symbols instances that has been created. so I tried the following
childSymbols = sym.getChildSymbols();
for(k = 0; k < 5; k++)
    childSymbols[k].css({"position":"relative","left":k*50});
it did not position the child symbols where i need it to be..
HOWEVER, when I tried to apply css to an element inside the symbol it worked.
for(k = 0; k < 5; k++)
    childSymbols[k].$("Rectangle2").css({"position":"relative","left":k*50});
Please can anyone help..

y = 0;
x = 30;
$.getJSON('slides.json', function(data){
                 for(alpha = 0; alpha < 5; alpha++){
                     var s = sym.createChildSymbol("rect", "Stage");
                     s.getSymbolElement().css({
                                      "top": x+"px",
                                      "position":"absolute",
                                      "right": y*315+20+"px"
                    x+=100;
                  // y+=100;
                          }//for

Similar Messages

  • How to add ComboBox to dynamically created DataGridColumn ?

    hai friends,
    help me, How to add ComboBox to dynamically created DataGridColumn

    public     function docfoldercurtainmanagerResult(event):void
    if(event.result){
    rightslistArray=event.result.RES2;
    //Alert.show(event.fault.message);
    <mx:DataGridColumn  
    headerText="Rights Level" minWidth="75" sortable="true" >
    <mx:itemRenderer>
    <fx:Component>
    <mx:ComboBox dataProvider="{outerDocument.rightslistArray}" labelField="sec_rights_level" />
    </fx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>

  • How to change Id of a dynamically created child element?

    Hi,
    I would like to change the id of the dynamically created elements in order to work easily with their later. Currently, edge automatically generate an random id like "eid_1376057792551" for each element.
    There is my code :
             sym.setVariable("labels", {
                       content2: "Visiteur",
                       content3: "Exposant",
                       content4: "Organisateur",
                       content5: "Contact",
                       content6: "Connexion"
             // Clear initial state
                                  sym.getSymbol("tab").deleteSymbol();
                                  // Find all large symbols in the library
                                  var prefix = "content"; // content1, content2 ... content99
                                  var allTabs = [];
                                  var symbolDefns = sym.getComposition().symbolDefns;
                                  for (var key in symbolDefns) {
                                    if (symbolDefns.hasOwnProperty(key) && key.search(new RegExp(prefix+"[0-9]{1,2}"))!=-1 ) {
                                             var tab = sym.createChildSymbol( "tab", "navigation" );
                                             tab.setVariable("contentId", key);
                                             allTabs.push(tab);
                                             tab.$("btnLabel").html( sym.getVariable("labels")[key] || "" );
                                             $tabEl = tab.getSymbolElement();
                                             $tabEl.data("sym", tab);
                                             $tabEl.css({float: "left", margin: "0 -1px 15px 0"});
                                             $tabEl.click(function(evt){
                                                      var tabSym = $(evt.currentTarget).data("sym");
                                                      $.each(allTabs, function(index,item) {
                                                                if (item != tabSym) { item.stop("normal"); item.setVariable("active", false); }
                                                      var $content = sym.$("content").empty();
                                                      sym.createChildSymbol(tabSym.getVariable("contentId"), "content");
    Thank you .

    hi -  trying to get this to work with no luck.
    a simple example as i understand it:
    var test = sym.createChildSymbol("rect", "Stage");
    test.attr("id","test2");
    would that work in changing the id of the newly created symbol to test2?
    thanks!

  • How to add a table (dynamic created) into a model attribute

    i have dynamically created an internal table. Generally i use model-binding in a stateful MVC-Application.
    Is there a possibiltity to transfer the dynamic table to a model. As far as i know generic attributes are not allowed in the modell class.
    Every hint welcome
    thx in advance

    By some miracle I do have this finally working.  I will warn you up front that the code is not the cleanest (I have stuff copied in from all over the place.  I probably have lots of unused variable references - but I am running out of time to clean it up further).  Also I don't have all the logic to support all your different possible dynamic structure types.  I always use SFLIGHT as my dyanmic structure.  Therefore you will have to adapt the coding to lookup the actual structure type in use.
    So I have a model that has an structure ITAB type ref to data.  In my Model initialization I go ahead and dynamically redfine this to my specific type:
    METHOD init.
      SELECT SINGLE * FROM sflight INTO CORRESPONDING FIELDS OF isflight.
      DATA: struct_type TYPE REF TO cl_abap_structdescr,
        tabletype TYPE REF TO cl_abap_tabledescr.
      struct_type ?= cl_abap_structdescr=>describe_by_name( 'SFLIGHT' ).
      CREATE DATA me->itab TYPE HANDLE struct_type.
    ENDMETHOD.
    Then in my View I have the following:
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <%@extension name="phtmlb" prefix="phtmlb" %>
    <%@extension name="bsp" prefix="bsp" %>
    <htmlb:content design="design2003" >
      <htmlb:page title=" " >
        <htmlb:form>
          <phtmlb:matrix width="100%" >
            <%
      field-symbols: <wa> type any.
      assign model->itab->* to <wa>.
    *  append initial line to <wa_itab> assigning <Wa>.
      data: descriptor type ref to CL_ABAP_STRUCTDESCR.
      descriptor ?= CL_ABAP_STRUCTDESCR=>describe_by_data( <wa> ).
      data: flddescr type DDFIELDS.
      flddescr = descriptor->GET_DDIC_FIELD_LIST( ).
      field-symbols: <wa_field> like line of flddescr.
      data: label type ref to cl_htmlb_label.
      data: input type ref to CL_HTMLB_INPUTFIELD.
      data: binding_string type string.
      "Loop through each field in the structure Definition
      loop at flddescr assigning <Wa_field>.
      clear label.
      clear input.
      concatenate '//model/itab.'
      <wa_field>-FIELDNAME
      into binding_string.
      label ?= cl_htmlb_label=>factory( _for = binding_string ).
      input ?= cl_htmlb_inputfield=>factory( _value = binding_string ).
            %>
            <phtmlb:matrixCell row    = "+1"
                               vAlign = "TOP" />
            <bsp:bee bee="<%= label %>" />
            <phtmlb:matrixCell col    = "+1"
                               vAlign = "TOP" />
            <bsp:bee bee="<%= input %>" />
            <%
      endloop.
            %>
          </phtmlb:matrix>
         <htmlb:button  id="Test" onClick="Test" text="Submit"/>
        </htmlb:form>
      </htmlb:page>
    The key to making this work are custom getter/setters.  In your model class, you can copy from the template methods (Like GETM_S_XYZ for the metadata structure method).  Copy them and remove the _ on the front of the name.  Then change XYZ to the name of the attribute you are binding for.  The following are my custom methods. 
    method get_m_s_itab .
    * uses ****************************************************************
    * data ****************************************************************
    * code ****************************************************************
    * method is supposed to return either info about a specific component
    * of a structure (component is not initial -> return ref to
    * if_bsp_metadata_simple) or the complete structure
    * (component is initial -> return ref to if_bsp_metadata_struct)
      data: l_attribute_ref type ref to data,
               l_attr_ref  type ref to data,
               l_exception     type ref to cx_root,
               l_ex            type ref to cx_sy_conversion_error,
               l_ex_bsp        type ref to cx_bsp_conversion_exception,
               l_ex2           type ref to cx_bsp_t100_exception,
               l_type          type i,
               l_index         type i,
               l_name          type string,
               l_component     type string,
               l_getter        type string.
      data: l_field_ref     type ref to data,
            l_dfies_wa      type dfies,
            rtti            type ref to cl_abap_elemdescr.
      data: crap type string,
              rest type string,
              t_index(10) type c.
      split attribute_path at '[' into crap rest.
      split rest           at ']' into t_index crap.
    ****Dummy Object to avoid dumps
      create object metadata type cl_bsp_metadata_simple
        exporting info = l_dfies_wa.
      call method if_bsp_model_util~disassemble_path
        exporting
          path      = attribute_path
        importing
          name      = l_name
          index     = l_index
          component = l_component
          type      = l_type.
      data: l_dataref type string.
    ****Dynamically determine your actual structure - for this demo
    ****I just hardcode SFLIGHT
      concatenate 'SFLIGHT-' l_component into l_dataref.
      data: field type ref to data.
    ****Create a data object of the specified type
      try.
          create data field type (l_dataref).
        catch cx_sy_create_data_error.
          exit.
      endtry.
      rtti ?= cl_abap_typedescr=>describe_by_data_ref( field ).
      l_dfies_wa = rtti->get_ddic_field( ).
      clear metadata.
      create object metadata type cl_bsp_metadata_simple
        exporting info = l_dfies_wa.
    endmethod.
    method get_s_itab .
    * uses ****************************************************************
    * data ****************************************************************
    * code ****************************************************************
    * get the given value of the component of the struct, e.g.
    *  field-symbols: <l_comp> type any.
    *  assign component component of structure XYZ to <l_comp>.
    *  value = <l_comp>.
      data: l_attr_ref  type ref to data,
              l_field_ref type ref to data.
      data: l_attribute_ref type ref to data,
            l_exception     type ref to cx_root,
            l_ex            type ref to cx_sy_conversion_error,
            l_ex2           type ref to cx_bsp_t100_exception,
            l_type          type i,
            l_index         type i,
            l_name          type string,
            l_component     type string,
            l_getter        type string,
            rtti            type ref to cl_abap_elemdescr.
      field-symbols: <o_data> type any,
                     <n_data> type any.
    *Test
    call method if_bsp_model_util~disassemble_path
        exporting
          path      = attribute_path
        importing
          name      = l_name
          index     = l_index
          component = l_component
          type      = l_type.
    * get a field reference for the assignment
      field-symbols: <wa> type any,
                     <l_comp> type any.
      assign me->itab->* to <wa>.
      assign component l_component of structure <wa> to <l_comp>.
      get reference of <l_comp> into l_field_ref.
    ****Dynamically determine your actual structure - for this demo
    ****I just hardcode SFLIGHT
      data: l_dataref type string.
      concatenate 'SFLIGHT-' l_component into l_dataref.
      data: field type ref to data.
    ****Create a data object of the specified type
      try.
          create data field type (l_dataref).
        catch cx_sy_create_data_error.
          exit.
      endtry.
      assign l_field_ref->* to <o_data>.
      assign field->*       to <n_data>.
      move <o_data> to <n_data>.
    * call conversion routine
      try.
          value = if_bsp_model_util~convert_to_string(
            data_ref           = field
            attribute_path     = attribute_path
            no_conversion_exit = 0 ).
        catch cx_sy_conversion_error into l_ex.
          me->errors->add_message_from_exception(
              condition = attribute_path
              exception = l_ex
              dummy     = value ).
        catch cx_bsp_t100_exception into l_ex2.
          me->errors->add_message_from_t100(
            condition = attribute_path
            msgid     = l_ex2->msgid
            msgno     = l_ex2->msgno
            msgty     = l_ex2->msgty
            p1        = l_ex2->msgv1
            p2        = l_ex2->msgv2
            p3        = l_ex2->msgv3
            p4        = l_ex2->msgv4
            dummy     = value ).
      endtry.
    endmethod.
    method set_s_itab .
    * uses ****************************************************************
    * data ****************************************************************
    * code ****************************************************************
    * assign the given value to the component of the struct, e.g.
    *  field-symbols: <l_comp> type any.
    *  assign component component of structure XYZ to <l_comp>.
    *  <l_comp> = value.
      data: l_attr_ref  type ref to data,
               l_field_ref type ref to data.
      data: l_attribute_ref type ref to data,
            l_exception     type ref to cx_root,
            l_ex            type ref to cx_sy_conversion_error,
            l_ex_bsp        type ref to cx_bsp_conversion_exception,
            l_ex2           type ref to cx_bsp_t100_exception,
            l_type          type i,
            l_index         type i,
            l_name          type string,
            l_component     type string,
            l_getter        type string,
            rtti            type ref to cl_abap_elemdescr.
      field-symbols: <o_data> type any,
                     <n_data> type any.
    *Test
      call method if_bsp_model_util~disassemble_path
        exporting
          path      = attribute_path
        importing
          name      = l_name
          index     = l_index
          component = l_component
          type      = l_type.
    * get a field reference for the assignment
      field-symbols: <wa> type any,
                     <l_comp> type any.
      assign me->itab->* to <wa>.
      assign component l_component of structure <wa> to <l_comp>.
      get reference of <l_comp> into l_field_ref.
    ****Dynamically determine your actual structure - for this demo
    ****I just hardcode SFLIGHT
      data: l_dataref type string.
      concatenate 'SFLIGHT-' l_component into l_dataref.
      data: field type ref to data.
    ****Create a data object of the specified type
      try.
          create data field type (l_dataref).
        catch cx_sy_create_data_error.
          exit.
      endtry.
      assign field->*       to <n_data>.
      move <l_comp> to <n_data>.
    * call conversion routine
      try.
          if_bsp_model_util~convert_from_string(
                               data_ref           = field
                               value              = value
                               attribute_path     = attribute_path
                               use_bsp_exceptions = abap_true
                               no_conversion_exit = 0 ).
        catch cx_sy_conversion_error into l_ex.
          me->errors->add_message_from_exception(
              condition = attribute_path
              exception = l_ex
              dummy     = value ).
        catch cx_bsp_conversion_exception into l_ex_bsp.
          me->errors->add_message_from_exception(
              condition = attribute_path
              exception = l_ex_bsp
              dummy     = value ).
        catch cx_bsp_t100_exception into l_ex2.
          me->errors->add_message_from_t100(
            condition = attribute_path
            msgid     = l_ex2->msgid
            msgno     = l_ex2->msgno
            msgty     = l_ex2->msgty
            p1        = l_ex2->msgv1
            p2        = l_ex2->msgv2
            p3        = l_ex2->msgv3
            p4        = l_ex2->msgv4
            dummy     = value ).
      endtry.
      if <n_data> is initial.
        clear <l_comp>.
      else.
        move <n_data> to <l_comp>.
      endif.
    endmethod.
    I know that is a LOT of nasty code without too much explanation.  I'm afriad there isn't time right now to expand on how it works too much.  Between my day job and trying to finish the BSP book, there just isn't much time left.  Like I said before there is a very large section in the book on this topic that hopefully explains it.  The book will be out in December or early January - but perhaps I will get some time before then to write up something on SDN about this.

  • How do I reference a dynamically created MovieClip from another MovieClip?

    Hi,
    I'd be grateful for any pointers to the following problem:
         I'm having trouble referencing dynamically created MovieClips (links in a side panel on a Flash website, created from an XML file) from the current MovieClip (the currently selected link).
         I wish to freeze the the link/MovieClip in its mouseOver state once it has been clicked - this part works. When a new link/MovieClip is clicked on, I wish to release the previously clicked-on link from its mouseOver state, which is what I've so far been unable to do.
         My problem seems to be referencing the previous link/MoveClip. I've used the trace statement trace(MovieClip(this).name) to determine that the MovieClips are named item0, item1, item2 and so on. However, I've been unable thus far to reference the previous clip thus far. I've tried to trace the route to the MovieClip from the stage, and also tried MovieClip(parent).item0.gotoAndStop and lots of other different permutations, but to no avail. It's the fact they seem to be in a container called 'panel' which is defeating me.
         Here's a live version I've uploaded, which might explain the problem better. Click on "UBER UNS" in the top menu bar to get to the page in question. It's the links on the left-hand side (Historie, Unser Team, etc.) which are the problem. You'll see that once they've been clicked on they remain in their mouseOver state.
         This is the code in question on the fla file, which is a file I did not create myself. The parts in black work fine; it's the red parts where the problem lies:
    import flash.display.MovieClip;
    panel.buttonMode = true;
    var lang:uint = 1;
    var url_Link:String=MovieClip(root).program.websiteXML .language[lang].pages.titlePage[MovieClip(root).program.linkPage].texts.pageList.txt[numT XT].@link;
    var urlPage:Number=Number(MovieClip(root).program.webs iteXML.language[lang].pages.titlePage[MovieClip(root).program.linkPage].texts.pageList.tx t[numTXT].@linkPage);
    var request:URLRequest;
    var linkIndex:uint;
    var lastClickedLink:MovieClip;   //This is supposed to store the last link that has been clicked - it doesn't work
    panel.addEventListener(MouseEvent.CLICK, clicLink);
    panel.addEventListener(MouseEvent.ROLL_OVER, mouseOverLink);
    panel.addEventListener(MouseEvent.ROLL_OUT, mouseOutLink);
    function mouseOverLink(event:MouseEvent):void {
          MovieClip(this).gotoAndPlay('s1');
    function mouseOutLink(event:MouseEvent):void {
          if(numTXT !== (linkIndex - 1)/5){         //freezes mouseOver state if this is the link for the current page
               MovieClip(this).gotoAndPlay('s2');
    function clicLink(event:MouseEvent):void {
          var linkpage:uint = MovieClip(root).program.linkPage;
          if (url_Link) {
               request = new URLRequest(url_Link);
               navigateToURL(request);
          } else {
               linkIndex = numTXT * 5 + 1;
               if(linkpage == 1){
                   MovieClip(root).chPages.cont.page_about_mc.page3Tu  rner_mc.gotoAndStop([linkIndex]);
              } else if (linkpage == 2){
                   MovieClip(root).chPages.cont.page3_mc.page3Turner_  mc.gotoAndStop([linkIndex]);
         lastClickedLink.gotoAndPlay('s2');  // this is supposed to release the previous clicked-on link from it's mouseOver state - doesn't work
         lastClickedLink = MovieClip(this).name;    //this is supposed to set the new link as the last link clicked after the old one has been released from it's mouseOver state - doesn't work
    If anyone can help, that would be great.

    What you might be after for that line is to use:
    lastClickedLink = MovieClip(event.currentTarget);
    For what you show, the name property of an object is a String, so I would expect you to be getting an error regarding trying to get a String to act like a MovieClip when you try to tell it to gotoAndPlay('s2').

  • How can I get permission to create a symbolic link?

    I am trying to create a symbolic link from a program, but I keep getting:
    A required privilege is not held by the client.
    I am running the program from my account which is in the Administrators group, and otherwise has admin rights. However, if I login to the Administrator account the program runs fine, so I know the program code is correct.
    I have checked the local security settings, and even added my account explicitly to the local security settings to create symbolic links, but that does not help. I have also turned of UAC, but that does not help.
    What do I need to do on Windows 8.1 to be able to create a symbolic link from an account other than Administrator?
    Cheers, Eric
    Eric Kolotyluk - software developer, music DJ, swing dancer

    Basically I have a Scala program that is doing:
      try {
        Files.createSymbolicLink(link21, folder1)
      catch {
        case fileSystemException: FileSystemException =>
          System.err.println("\n\t**** Error configuring test fixture ***\n\n")
          println(fileSystemException)
          if (fileSystemException.getMessage().contains("A required privilege is not held by the client"))
            println("You need to set permissions by...\n")
    Where Files is the java.nio API. In fact it's a unit test fixture that tests to make sure my code handles symbolic links properly. The test fixture creates a temporary directory, for example
    C:\Users\Eric\AppData\Local\Temp\testFolder-432432684744817467
    and more files and folders below that. In one folder, it tries to make a symbolic link to another folder.
    I tried what you said with Run As Administrator, in this case, I ran my Eclipse IDE as Administrator and the code works -- thanks for the tip :-)
    However, in practice, I need this to work as part of automated unit test running as part of a Maven build, so is there some way to set things up that do not require "Run As Administrator"?
    Now that I have one solution, I can probably figure out some hack, but I was hoping there would be some more simple straightforward way to do what I want.
    Eric Kolotyluk - software developer, music DJ, swing dancer

  • How to access variables in dynamically created custom components? (Flex 4.5)

    Hi i have another riddle here.
    i have few custom MXML components in my library and i am adding them to the stage by script, after that i want to fill some data, lets say Label.text, inside this component.
    The question is how to acces / reference variables or other components inside the main custom component which was added to the stage by script???
    thx M.

    ok, the answer is here
    http://blog.flexexamples.com/2008/08/28/creating-a-component-instance-by-class-name-in-act ionscript-30/

  • How to get values from dynamically populated field symbol

    Hi all,
    I am having a field symbol <fs_table> type standard table, which is getting populated dynamically.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = i_fieldcat[]
        IMPORTING
          ep_table        = is_eptab.
      ASSIGN is_eptab->* TO <fs_table> .
    After the ALV display i am making some changes in the ALV and getting a new internal table <fst_table>,which is having changed values.
    Now the problem is that i am not able to get the changed values from <fst_table>  as it is not of any structure type and cant associate it with any field like we do in normal internal table and work areas like, wa-fieldname.
    All the fields are dynamic.
    Regards,
    Anant

    Hello Anant
    You have to access to access the fields of your dynamic outtab dynamically as well.
    DATA: ls_fcat   TYPE lvc_s_fcat.
    FIELD-SYMBOLS:
      <ls_struc>   TYPE any,
      <ld_fld>       TYPE any.
    LOOP AT <fs_table> ASSIGNING <ls_struc>.
      LOOP AT i_fieldcat INTO ls_fcat.
        ASSIGN COMPONENT ls_fcat-fieldname OF STRUCTURE <ls_struc> TO <ld_fld>.
        ...  " do processing
      ENDLOOP.
    ENDLOOP.
    Regards
      Uwe

  • Remove a Dynamically Added Child Symbol

    I am trying to check if a symbol exists, and if it does remove it. Otherwise, add it. Since this is being added to a bettun, the goal is that an object shows up when you click and goes away when you click again.
    My current code is below. Help?!
    var chatPanel = sym.getSymbol("chat_wrap").getChildSymbols;
    if (chatPanel.length > 0) {
    chatPanel[0].deleteSymbol();
    else {
        // handle the error however you want here, or fail silently
        sym.createChildSymbol("chat_panel", "chat_wrap");
        console.log("symbol added")

    Hi Phil and thanks for your answer.
    I have got my own cellrenderer but i do handle selected nodes different..
    Here the code in the paint method of my treecellrenderer:
    public void paint(Graphics g)
         super.paint( g );
         Icon currentIcon = getIcon();
         TreeModelNode node = getCurrentUserObject();
         //Set color for node, selected or not.
         if(selected)
              g.setColor( new Color(0,0,132) );
              setForeground( Color.white );
         else
              g.setColor( getParent().getBackground() );
         //Get textarea to paint.     
         if( currentIcon != null && getText() != null )
              int offset = ( currentIcon.getIconWidth() + getIconTextGap() );
              g.fillRect( offset, 0, getWidth() - offset +1 ,getHeight()-1 );
         else
              g.fillRect( 0, 0, getWidth() +1, getHeight()-1 );
    }

  • Get the ID of a dynamically created symbol from library, INSIDE another symbol.

    Hi everyone,
    I'm trying to get the id from a dynamic created symbol from library.
    When dynamically creating the symbol directly on the stage (or composition level), there's no problem.
    But I just can't get it to work when creating the symbol inside another symbol. 
    Below some examples using both "getChildSymbols()" and "aSymbolInstances" 
    // USING "getChildSymbols()" ///////////////////////////////////////////////////////////////////////// 
    // ON THE STAGE 
    var m_item = sym.createChildSymbol("m_item","Stage");
    var symbolChildren = sym.getChildSymbols(); 
    console.log(symbolChildren[0].getSymbolElement().attr('id')); // ok eid_1391853893203
    // INSIDE ANOTHER SYMBOL
    var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement()); 
    var symbolChildren = sym.getSymbol("holder").getChildSymbols(); // Am i using this wrong maybe?
    console.log(symbolChildren.length) // returns 0 so can't get no ID either
    // USING "aSymbolInstances"" ////////////////////////////////////////////////////////////////////////// 
    // ON THE STAGE
    var m_item = sym.createChildSymbol("m_item","Stage"); 
    console.log(sym.aSymbolInstances[0]); // ok (i guess) x.fn.x.init[1] 0: div#eid_1391854141436
    // INSIDE ANOTHER SYMBOL
    var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement());
    console.log(sym.getSymbol("holder").aSymbolInstances[0]); // Javascript error in event handler! Event Type = element 
    In this post http://forums.adobe.com/message/5691824 is written: "mySym.aSymbolInstances will give you an array with all "names" when you create symbols"
    Could it be this only works on the stage/ composition level only and not inside a symbol? 
    The following methods to achieve the same are indeed possible, but i simply DON'T want to use them in this case:
    1) Storing a reference of the created symbol in an array and call it later by index.
    2) Giving the items an ID manually on creation and use document.getElementById() afterwards.
    I can't believe this isn't possible. I am probably missing something here.
    Forgive me I am a newbie using Adobe Edge!
    I really hope someone can help me out here.
    Anyway, thnx in advance people!
    Kind Regards,
    Lester.

    Hi,
    Thanks for the quick response!
    True this is also a possibility. But this method is almost the same of "Giving the items an ID manually on creation and use document.getElementById() afterwards".
    In this way (correct me if i'm wrong) you have to give it an unique ID yourself. In a (very) big project this isn't the most practical way.
    Although I know it is possible.
    Now when Edge creates a symbol dynamically on the Stage (or composition level) or inside another symbol it always gives the symbol an ID like "eid_1391853893203".
    I want to reuse this (unique) ID given by Edge after creation.
    If created on the stage directly you can get this ID very easy. Like this;
    var m_item = sym.createChildSymbol("m_item","Stage");
    var symbolChildren = sym.getChildSymbols(); 
    console.log(symbolChildren[0].getSymbolElement().attr('id')); // ok eid_1391853893203
    I want to do exactly the same when created INSIDE another symbol.
    var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement());
    Now how can I accomplish this? How can I get the Id of a dynamically created symbol INSIDE another symbol instead of created directly on the stage?
    This is what i'm after.
    Thnx in advance!

  • To delete this dynamically created symbol

    Hello,
    I dynamically created  a symbol :
    var vid = sym.createChildSymbol("video_holder", "Stage");
    vid.getSymbolElement().html("<iframe src='//player.vimeo.com/video/44150607' width='500' height='281' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>");
    vid.getSymbolElement().css({"margin":"auto", "top":"100px"});
    the I want another button to remove that Symbol from Stage :
    vid.deleteSymbol(); or sym.getSymbol("video_holder").deleteSymbol();
    How to do it ?
    thanks forever !
    s.

    1) About sym.getComposition().getSymbols().
    It returns an array. So you have to browse it.
    2) About vid.
    This is the same name but two different variables.
    Because they are only available within their own code panel.
    To go further, see: http://learn.jquery.com/javascript-101/
    You have to read: "scope" and "closures".
    PS : je viens de voir que la vidéo est en français. Vous parlez français ?

  • Is it possible to dynamically create xml nodes?

    Hi,
    Is it possible to dynamically create child nodes of an xml
    file with flash??
    Im what i want to do is save a users name etc in an xml file
    without having to manually add nodes in.
    So when a user clicks a button to save their details a new
    node is created.
    Thnx

    Yes.
    Look
    at XML.appendChild as a starting point.

  • Dynamically created object

    Hi
    I did not find any way of accessing a dynamically created
    object by using notation this[id].
    As the code below shows, only hard coded id objects are
    recognised by this[id] notation.
    Any way to do it ?
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="init()">
    <mx:Script>
    <![CDATA[
    import mx.controls.*;
    public var l:Label;
    public function init():void {
    l = new Label();
    l.id = 'label1';
    l.text = 'firstname';
    addChild(l);
    public function fred(event:Event):void {
    mytextarea1.text+=this['mytextarea1'].name + '\n';
    mytextarea1.text+=this['label1'].name + '\n';
    ]]>
    </mx:Script>
    <mx:TextArea id="mytextarea1" width="1300"
    height="200"/>
    <mx:Button click="fred(event)" />
    </mx:Application>

    Thanks guys but I think my example is too simple compared to
    my "real world" current problem ...
    In my project, I dynamically create containers and children.
    I'd like to reach directly a then dynamically created child by its
    id, but notation this[id] is not recognised.
    A better example : form f1 (id='form1) contains 2 labels (ids
    'form1label1' and 'form1label2') ; f1 is included in form f0.
    Calling this['form1label1'] crashed even though it is a
    declared id control ! The same example using <mx> tags would
    not crash...
    And I have gone aroud 10000 articles but never found an
    answer to this.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="init()">
    <mx:Script>
    <![CDATA[
    import mx.controls.*;
    import mx.containers.*;
    public function init():void {
    var f0:VBox = new VBox();
    var f1:VBox = new VBox();
    var l:Label;
    f0.id = 'form0';
    f1.id = 'form1';
    l= new Label();
    l.id = 'form1label1';
    l.text = 'mobile';
    f1.addChild(l);
    l = new Label();
    l.id = 'form1label2';
    l.text = 'work';
    f1.addChild(l);
    f0.addChild(f1);
    addChild(f0);
    public function fred(event:Event):void {
    mytextarea1.text+=Label( this['form1label1'] ).text + '\n';
    ]]>
    </mx:Script>
    <mx:TextArea id="mytextarea1" width="1300"
    height="200"/>
    <mx:Button click="fred(event)" />
    </mx:Application>

  • Create a symbol and change its id

    Hi edge people
    I know how to create a symbol dynamicly but I want to change the id of the element to something other then random
    var mySymbolObject = sym.createChildSymbol("imageBox","stage");
    mySymbolObject.setVariable("id", "newname");
    I need to do this so I can access the element later
    Sorry for the simple question

    Hey richgizmo, here is how to dynamically create a symbol, then access it later. According to the API doc:
    // Create a new symbol "kitten_paw" on the Stage
    sym.createChildSymbol("kitten_paw", "Stage");
    // Reference the symbol
    var kitten_sym = kitten_paw.getSymbolElement();
    // Animate the opacity to 0
    kitten_sym.animate({opacity: 0}, 500);
    Here is the API for reference:
    http://www.adobe.com/devnet-docs/edgeanimate/api/current/index.html

  • How to get the co-ordinates of a dynamically created input field

    Hello Frn's
    i have created a dynamic text view . but this text view is not appearing at proper position . I want palce it infront of a dynamically created input field . how can i do this ?
    as i am thinking ...i should first of all  get info about the co-ordinates of   dynamaclly creatd input field . and with respect to these co-ordinates ...set the position of  text View .
    Please suggest  your thoughts .
    Thanks and Regards
    Priyank Dixit

    Hi,
    There is no provision in WD for getting screen coordinates and then placing the UI element.
    You to add the UI element to layout editor and based on the layout type it will add the UI element to respective position.
    I would advice not to create dynamic UI elements( instead you can create them statically and then play with visibility status through context binding ). This will be more effective way and less error prone. This is also recommended practice.
    still,For dynamic creation you can refer to following wiki:
    http://wiki.sdn.sap.com/wiki/display/WDABAP/CreatingUIElementsDynamicallyinAbapWebdynpro+Application
    regards
    Manas Dua

Maybe you are looking for