SWFAddress 2.2 不响应特定 URL

发布于 2024-08-03 18:38:48 字数 1623 浏览 4 评论 0原文

我正在将 SWFAddress 实现到 Flash 影片中,虽然我的导航正确设置了链接,但当我输入特定 URL 时,它似乎根本不与浏览器通信。我错过了一个听众还是什么?

http://client.deicreative.com/test/TBB/

这堂课与我的导航类:

import SWFAddress.as;

class code.RunSWFAddress {

public function RunSWFAddress(){
    init();
}
private function init() {
    var scope = this;

    SWFAddress.setStrict(false);
    SWFAddress.onChange = function() {
        var value = SWFAddress.getValue();
        var path = SWFAddress.getPath();
        var id = SWFAddress.getParameter('id');
        if (code.PageContent.getInstance().xmlVar1.getBytesLoaded() == code.PageContent.getInstance().xmlVar1.getBytesTotal()){

            if(SWFAddress.getValue() == '/' || SWFAddress.getValue() == '') {
                code.Navigation.getInstance().showPage(0);

            } else {
                for(var i:Number = 0; i<code.Startup.getInstance().numPages; i++){
                    if(SWFAddress.getValue() == code.Startup.getInstance().page_arr[i][0]){

                        code.Navigation.getInstance().showPage(i);
                    }
                }
            }
        }
        var title = 'The Broadway Building';    
        var names = SWFAddress.getPathNames();
        for (var i = 0; i < names.length; i++) {
            title += ' | ' + names[i].substr(0,1).toUpperCase() + names[i].substr(1);
        }
        var id = SWFAddress.getParameter('id');
        if (id != '') {
            title += ' | ' + id; 
        }
        SWFAddress.setTitle(title);
    }

}

 }

I am implementing SWFAddress into a Flash movie, and while my navigation is setting the links correctly, when I type in a specific URL, it doesn't seem to communicate with the browser at all. Am I missing a listener or something?

http://client.deicreative.com/test/TBB/

This class talks to my navigation class:

import SWFAddress.as;

class code.RunSWFAddress {

public function RunSWFAddress(){
    init();
}
private function init() {
    var scope = this;

    SWFAddress.setStrict(false);
    SWFAddress.onChange = function() {
        var value = SWFAddress.getValue();
        var path = SWFAddress.getPath();
        var id = SWFAddress.getParameter('id');
        if (code.PageContent.getInstance().xmlVar1.getBytesLoaded() == code.PageContent.getInstance().xmlVar1.getBytesTotal()){

            if(SWFAddress.getValue() == '/' || SWFAddress.getValue() == '') {
                code.Navigation.getInstance().showPage(0);

            } else {
                for(var i:Number = 0; i<code.Startup.getInstance().numPages; i++){
                    if(SWFAddress.getValue() == code.Startup.getInstance().page_arr[i][0]){

                        code.Navigation.getInstance().showPage(i);
                    }
                }
            }
        }
        var title = 'The Broadway Building';    
        var names = SWFAddress.getPathNames();
        for (var i = 0; i < names.length; i++) {
            title += ' | ' + names[i].substr(0,1).toUpperCase() + names[i].substr(1);
        }
        var id = SWFAddress.getParameter('id');
        if (id != '') {
            title += ' | ' + id; 
        }
        SWFAddress.setTitle(title);
    }

}

 }

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

生生不灭 2024-08-10 18:38:48

我在 swfobject 嵌入中缺少 id 属性。现在可以工作了! :)

I was missing the id attribute in my swfobject embed. Works now! :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文