Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-34528

get Application.id returning Application.Name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Apache Flex 4.14.0
    • None
    • Spark Components
    • None
    • Mac, Windows, nearly Everywhere

    Description

      I created a Flex Web Application where I need to give the app focus.
      Btw. ts is for some internally, kinda a User configuration.
      In my html document stands:
      var ts=7;
      var attributes = {};
      attributes.id = "program";
      attributes.name = "program?ts=" + ts;
      attributes.align = "middle";
      swfobject.embedSWF(
      "program.swf?ts=" +ts, "flashContent",
      "100%", "100%",
      swfVersionStr, xiSwfUrlStr,
      flashvars, params, attributes);
      swfobject.createCSS("#flashContent", "display:block;text-align:left;");

      So I used this line to set Focus within pMain:
      ExternalInterface.call("function()

      { var app = document.getElementById('"+id+"'); app.tabIndex = 0; app.focus(); }

      ");

      But the id (from spark.components.Application get id) is returning:
      program?ts=2
      And the focus isn't set.

      But if I write:
      ExternalInterface.call("function()

      { var app = document.getElementById('program'); app.tabIndex = 0; app.focus(); }

      ");
      The focus is set.

      spark.components.id is a get Function for ExtenalInterface, but its getting the name of the application and not the id set in Javascript.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Sonorpearl Jan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: