Bug in FlexGlobals.topLevelApplication?


i having problem flexglobals.toplevelapplication. have 5 situations:

 

1) running in prjector;

2) firefox, running swf directly in browser;

3) firefox, running swf embedded in html page;

4) ie, running swf directly in browser;

5) ie, running swf embedded in html page.

 

the following returns of flexglobals.toplevelapplication command:

 

1) main0;

2) main0;

3) main0;

4) main0;

5) flexglobals.

 

the last 1 looks very, wrong me, , means can't toplevelapplication in ie when swf embedded in html page (the common scenerio!). instead either:

 

1) value of attributes.id;

2) or if not specified, id of html div swf enclosed in, in case 'altcontent'.

 

i have tried on 3 different machines running windows 7 following player versions:

 

11.4.402.265

11.3.300.265

11.3.300.271

 

as application.application depreciated , can't compile @ moment, there reliable way toplevelapplication? application failing in ie , seems due flexglobals.toplevelapplication.

 

the code using swfobject haven't included.

 

-- main.mxml ---

 

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

<s:application xmlns:fx="http://ns.adobe.com/mxml/2009"

               xmlns:s="library://ns.adobe.com/flex/spark"

               xmlns:mx="library://ns.adobe.com/flex/mx"

               creationcomplete="oncreationcomplete()">

 

    <fx:script>

        <![cdata[

            import mx.controls.alert;

            import mx.core.flexglobals;

 

            private function oncreationcomplete():void {

                alert.show("flexglobals.toplevelapplication [" + flexglobals.toplevelapplication + "]");

            }

        ]]>

    </fx:script>

 

</s:application>

 

--- index.html ---

 

<!doctype html>

<html lang="en">

<head>

    <meta charset="utf-8"/>

    <title>flexglobals</title>

    <meta name="description" content="" />

 

    <script src="js/swfobject.js"></script>

    <script>

        var flashvars = {

        };

        var params = {

            menu: "false",

            scale: "noscale",

            allowfullscreen: "true",

            allowscriptaccess: "always",

            bgcolor: "",

            wmode: "direct" // can cause issues fp settings & webcam

        };

        var attributes = {

            id:"flexglobals"

        };

        swfobject.embedswf(

            "flexglobals.swf",

            "altcontent", "100%", "100%", "10.0.0",

            "expressinstall.swf",

            flashvars, params, attributes);

    </script>

    <style>

        html, body { height:100%; overflow:hidden; }

        body { margin:0; }

    </style>

</head>

<body>

    <div id="altcontent">

        <h1>flexglobals</h1>

        <p><a href="http://www.adobe.com/go/getflashplayer">get adobe flash player</a></p>

    </div>

</body>

</html>

are saying alert.show displaying different on ie?



More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support