0

我正在尝试实施最新的 sIFR。但我什至无法让最简单的测试工作。我的测试页面位于http://www.kellymitchelljewelry.com/testsifr.asp。第一行和第三行之间应该有一条 sIFR 生成的行,上面写着“第二行”。我正在使用 sIFR 页面上提供的示例。

我的 html 看起来像这样:

<html>
<head>
<title>Kelly Mitchell Fine Jewelry</title>
<link rel="stylesheet" href="sifr.css" type="text/css">
<script src="sifr.js" type="text/javascript"></script>
<script src="sifr-config.js" type="text/javascript"></script>
</head>
<body>
First Line<br><br>
<h1>Second Line</h1>
<br>Third Line<br><br>
</body>
</html>

我的 sifr-config.js 看起来像这样:

var cgoth = { src: 'cgoth.swf' };
sIFR.activate(cgoth);
sIFR.replace(cgoth, {
  selector: 'h1'
});

我的 sifr.css 文件如下所示:

@media screen {
  .sIFR-flash {
    visibility: visible !important;
    margin: 0;
    padding: 0;
  }

  .sIFR-replaced, .sIFR-ignore {
    visibility: visible !important;
  }

  .sIFR-alternate {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    display: block;
    overflow: hidden;
  }

  .sIFR-replaced div.sIFR-fixfocus {
    margin: 0pt; 
    padding: 0pt; 
    overflow: auto; 
    letter-spacing: 0px; 
    float: none;
  }
}

@media print {
  .sIFR-flash {
    display    : none !important;
    height     : 0;
    width      : 0;
    position   : absolute;
    overflow   : hidden;
  }

  .sIFR-alternate {
    visibility : visible !important;
    display    : block   !important;
    position   : static  !important;
    left       : auto    !important;
    top        : auto    !important;
    width      : auto    !important;
    height     : auto    !important;
  }
}

/*
Place CSS rules for to-be-replaced elements here. Prefix by .sIFR-active
so they only apply if sIFR is active. Make sure to limit the CSS to the screen
media type, in order not to have the printed text come out weird.
*/
@media screen {
  .sIFR-active h1 {
    font-family: Verdana;
    visibility: hidden;
    line-height: 1em;
  }
  */

我尝试重新创建我的 swf 文件以防万一我做错了什么,并严格按照说明进行操作以确保我没有遗漏任何内容。

有人可以帮我弄清楚我做错了什么吗?

汤姆

4

2 回答 2

0

I have never been able to get a .swf file exported from Flash to work with sIFR. I've always ended up having to use the online sIFR generator: http://www.sifrgenerator.com/wizard.html

I don't know if my version of Flash (CS3) is just not compatible with sIFR or what... I do always save as version 8 like it says to, and make sure every setting is as it should be, but no luck. However, using that generator always seems to solve it. So if your Flash is jinxed to, you might want to give it a try.

于 2009-12-17T13:30:24.973 回答
0

我认为您的 Flash 电影不正确,直接打开它应该会显示“使用 sIFR 3 渲染”文本。确保它已正确导出。

于 2009-12-11T22:39:50.320 回答