在Flash读取请求的URL [英] Read request URL in Flash

查看:168
本文介绍了在Flash读取请求的URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不是一个Flash开发者,但我坚持用Flash开发人员,被困在ActionScript1第三方程序。

I am not a flash developer, but I am stuck with a flash developer, stuck with a third party program in ActionScript1.

我问他要得到它嵌入Flash对象(如读取浏览器的地址栏)的页面的请求URL。然后得到的查询字​​符串变量,并将其发送回应用程序。

I asked him to get the request URL of the page which embeds the flash object (like reading the address bar in the browser). and then get Query string variables and send it back to an application.

如何阅读这些变量?请记住这是行动SCRIPT1。

How to read those variables? Remember it is action script1.

感谢

推荐答案

其实我使用的JavaScript这样的,谢谢

Actually I used javascript like this, thanks

<script type="text/javascript">
        function writeFlash()
        {
            var id = '';

            var queryString = new String();
            queryString = window.location.search;

            if (queryString != null)
            {
                var parts = new Array();
                parts = queryString.split("&");

                parts = parts[0].split("=");
                id = parts[1];

            }



            var ieObj = '<div id="flashContent">'
            + '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="1200" height="800" id="BookFlipping" align="middle">'
            + '<param name="movie" value="BookFlipping.swf" />'
            + '<param name="quality" value="high" />'
            + '<param name="bgcolor" value="#ffffff" />'
            + '<param name="play" value="true" />'
            + '<param name="loop" value="true" />'
            + '<param name="wmode" value="window" />'
            + '<param name="scale" value="showall" />'
            + '<param name="menu" value="true" />'
            + '<param name="devicefont" value="false" />'
            + '<param name="salign" value="" />'
            + '<param name="allowScriptAccess" value="sameDomain" />'

            + '<PARAM NAME="FlashVars" VALUE="ID='
            + id
            + '"/>'

            + '<!--[if !IE]>-->'
            + '<object type="application/x-shockwave-flash" data="BookFlipping.swf" width="1200" height="800">'
            + '<param name="movie" value="BookFlipping.swf" />'
            + '<param name="quality" value="high" />'
            + '<param name="bgcolor" value="#ffffff" />'
            + '<param name="play" value="true" />'
            + '<param name="loop" value="true" />'
            + '<param name="wmode" value="window" />'
            + '<param name="scale" value="showall" />'
            + '<param name="menu" value="true" />'
            + '<param name="devicefont" value="false" />'
            + '<param name="salign" value="" />'
            + '<param name="allowScriptAccess" value="sameDomain" />'

            + '<PARAM NAME="FlashVars" VALUE="ID='
            + id
            + '"/>';

            + '<!--<![endif]-->'
            + '<a href="http://www.adobe.com/go/getflash">'
            + '<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />'
            + '</a>'
            + '<!--[if !IE]>-->'
            + '</object>'
            + '<!--<![endif]-->'
            + '</object>';

            //alert(ieObj);
            document.write(ieObj);


        }
    </script>


<body>

    <script language="JavaScript" type="text/javascript">
    <!-- 
    writeFlash();
    -->
    </script> 


</body>

这篇关于在Flash读取请求的URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆