2009-12-11 57 views
0

我試圖實施最新的sIFR。但是我無法使最簡單的測試工作。我的測試頁面是http://www.kellymitchelljewelry.com/testsifr.asp。應該有一個sIFR生成的行,在第一行和第三行之間顯示「第二行」。我正在使用sIFR頁面上提供的示例。sIFR 3 - 我無法讓它顯示任何東西

我的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文件,以防萬一我做錯了事,並嚴格按照說明來確保我沒有離開任何東西出。

有人能幫我弄清楚我做錯了什麼嗎?

湯姆

回答

0

我不認爲你的Flash影片是正確的,opening it directly應顯示文本「與sIFR的3渲染」。確保它已正確導出。

0

我從來沒有能夠從Flash導出的.swf文件與sIFR一起使用。我一直最終不得不使用在線sIFR發生器:http://www.sifrgenerator.com/wizard.html

我不知道我的Flash版本(CS3)是否與sIFR不兼容或什麼...我總是保存爲版本8就像它說的那樣,並確保每個設置都是應該的,但沒有運氣。但是,使用該生成器似乎總能解決這個問題。所以,如果你的Flash非常受歡迎,你可能需要試一試。