Jan created FLEX-34528:
--------------------------

             Summary: get Application.id returning Application.Name
                 Key: FLEX-34528
                 URL: https://issues.apache.org/jira/browse/FLEX-34528
             Project: Apache Flex
          Issue Type: Bug
          Components: Spark Components
    Affects Versions: Apache Flex 4.14.0
         Environment: Mac, Windows, nearly Everywhere
            Reporter: Jan


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.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to