Session 如何防止swf创建自己的会话id?

Session 如何防止swf创建自己的会话id?,session,cookies,flash,session-cookies,Session,Cookies,Flash,Session Cookies,我有一个嵌入在html文件中的swf: <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>v2</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style type=

我有一个嵌入在html文件中的swf:

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
        <title>v2</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <style type="text/css" media="screen">
        html, body { height:100%; background-color: #ffffff;}
        body { margin:0; padding:0; overflow:hidden; }
        <!--#wrapper { width:100%; height:100%;}
        #flashContent { width:100%; height:100%; margin-right:auto; margin-left:auto; text-align:center;}-->

        </style>
    <script language="javascript">AC_FL_RunContent = 0;
        </script>
    <script src="/AC_RunActiveContent.js" language="javascript"></script>
    <script language="javascript">
        function backfunc(arg){
            window.location.replace(arg);
        }   
    </script>
<head>
<body>

    <script language="javascript">
    var flashpath = '{{song.flashURL}}' + '?date=' + new Date().getTime();
    var songId = {{song.id}};
    var vars = 'username={{current_user.first_name}} {{current_user.last_name}}' + '&' +
               'songid={{song.id}}' + '&' +
               'sessionid={{session_id}}';
    if (AC_FL_RunContent == 0) {
        alert("This page requires AC_RunActiveContent.js.");
    } else { 

        AC_FL_RunContent(
            'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=11,0,0,0',
            'width', '640',
            'height', '480',
            'src', flashpath,
            'quality', 'high',
            'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
            'align', 'middle',
            'play', 'true',
            'loop', 'false',
            'scale', 'default',
            'wmode', 'window',
            'flashVars',vars,
            'devicefont', 'false',
            'id', '{{song.flashURL}}',
            'bgcolor', '#ffffff',
            'name', '{{song.flashURL}}',
            'menu', 'true',
            'allowFullScreen', 'true',
            'allowScriptAccess','sameDomain',
            'movie', flashpath,
            'salign', ''
            ); //end AC code
    }
</script>
</body>
</html>
js:


当我执行此操作时,问题就出现了。问题是,当加载主页时,我会看到旧的已注销用户的页面,因为flash保留了旧的和失效的会话id。因此,由于swf,我无法仅管理浏览器和服务器之间的会话。我怎样才能解决这个问题。我已经在谷歌和这里搜索了两周,最后我决定在这里写作。提前感谢。

问题肯定与闪存无关。会话是服务器端的,我在您的页面中看不到任何服务器脚本。(像PHP或C#)我终于解决了这个问题。问题是域名。当用户从www.site.com进入站点时,浏览器将创建一个会话。在我们的服务器代码中,重定向为site.com/blabla。由于“www”丢失,浏览器会创建一个新会话,问题就来了。我通过使用相对路径解决了这个问题。

我认为Flash对会话一无所知。
if(ExternalInterface.available){
    txt.text = url;
    ExternalInterface.call("backfunc",url);
}
else{
    txt.text = "ex int not available"; 
}
function backfunc(arg){
    window.location.replace(arg);
}