| |
Lavinya.Net Panolar
| Yazar |
Mesaj |
|
| Bugfixed |
Tarih: Perşembe, Ağustos 10, 2006 17:57
Mesaj konusu: w3c standarları ile flash sayfalar hazırlama |
|
|
Site Admin

Yaş: 27
Burçlar:
Meslek/Sektör: Bilgisayarla İlgili-İnternet
Şehir: Giresun
Kayıt: 21 Haziran 2002
Mesajlar: 2334
|
|
W3 xhtml 1.0 1.1 Standartlarına uygun flash öğeli sayfaları hazırlama
( How to correctly insert a Flash into XHTML )
1. Yöntem
( Solution )
Bilindiği üzere w3 standaları özellikle xhtml 1, 1,1 standartlarına uygun geçerli sayfalar hazırlanırken flash öğelerde sorun çıkıyor. Xhtml flashda uygulanan tagları yer hatası veriyordu.
SWFObject : Javascript Flash Player detection and embed script
SWFObject adlı küçük bir java script ve html kodu ile bu sorun ortadan kalkıyor ve güzel arayüzler ortaya çıkıyor.
SWFObject programcığının son sürümü şu an itibariyle 1.5 (08 mayıs 2007)
http://blog.deconcept.com/swfobject/swfobject.zip bu adresten indirebilir,
http://blog.deconcept.com/ bu blog sayfasından ayrıntılı bilgilere ulaşabilirsiniz. Aşağıda ise örnek kodlar verilmekte;
1. swfobject.js dosyası
2. test.html sayfamız örneği :
Kod:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="tr">
<head>
<meta content="text/html; charset=UTF-8"
http-equiv="content-type" />
<title>SWFObject</title>
<meta content="Murat Esgin" name="author" />
<meta content="SWFObject" name="description" />
<script type="text/javascript" src="swfobject.js"></script>
<style type="text/css">
body {
background-color: #eeeeee;
font: .8em/1.3em verdana,arial,helvetica,sans-serif;
}
#info {
width: 300px;
overflow: auto;
}
#flashcontent {
border: solid 1px #000;
width: 300px;
height: 300px;
float: left;
margin: 15px 20px;
}
</style>
</head>
<body>
<div id="flashcontent">
<strong>You need to upgrade your Flash Player</strong>
This is replaced by the Flash content.
Place your alternate content here and users without the Flash plugin or with
Javascript turned off will see this. Content here allows you to leave out <code>noscript</code>
tags. Include a link to <a href="swfobject.html?detectflash=false">bypass the detection</a> if you wish.
</div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("so_tester.swf", "sotester", "300",
"300", "8", "#FF6600");
so.addVariable("flashVarText", "this is passed in via
FlashVars for example only"); // this line is optional, but this example
uses the variable and displays this text inside the flash movie
so.write("flashcontent");
// ]]>
</script>
<div id="info">
<p>
This Flash movie was embedded using the <a href="http://blog.deconcept.com/swfobject/">SWFObject</a> embed
method by <a href="http://blog.deconcept.com/">Geoff Stearns</a>.
</p>
<p>Other sample embeds:</p>
<ul>
<li>Basic Flash Embed with alternate content</li>
<li><a href="fullpage.html">Full page Flash embed</a></li>
<li><a href="expressinstall.html">Basic Flash Embed with Express Install allowed</a></li>
</ul>
<p>You can also <a href="flashversion.html">view your installed
Flash version</a>.</p>
<p>
<a href="view-source:http://blog.deconcept.com/swfobject/swfobject.html">
View source</a> (in mozilla, firefox) | <a href="swfobject_source.js">View Javascript</a>.
</p>
<p>
<a href="http://blog.deconcept.com/swfobject/swfobject1-4.zip">Download Source</a>.
</p>
</div>
<p style="clear: both;margin-left: 20px"><a href="http://validator.w3.org/check?uri=referer">Validate XHTML</a> and
<a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></p>
</body>
</html>
3. so_tester.swf asıl swf dosyamız.
|
En son Bugfixed tarafından Salı, Mayıs 15, 2007 21:10 tarihinde değiştirildi, toplamda 2 kere değiştirildi. |
|
|
Sosyal İmleme
|
| Bugfixed |
Tarih: Salı, Mayıs 8, 2007 11:01
Mesaj konusu: Re: w3c standarları ile flash sayfalar hazırlama |
|
|
Site Admin

Yaş: 27
Burçlar:
Meslek/Sektör: Bilgisayarla İlgili-İnternet
Şehir: Giresun
Kayıt: 21 Haziran 2002
Mesajlar: 2334
|
W3 xhtml 1.0 1.1 Standartlarına uygun flash öğeli sayfaları hazırlama
( How to correctly insert a Flash into XHTML )
2. Yöntem
( Solution )
Kendi kodunuzdaki öğeleri aşağıya ekleyerek uygun hale getirebilirsiniz.
Örnek olarak bu uygun olmayan bir koddur:
Kod: <object
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/
flash/swflash.cab#version=8,0,0,0"
width="550" height="400">
...
<param name="movie" value="dosyamiz.swf" />
<param name="quality" value="high" />
...
<embed src="dosyamiz.swf" quality="high" bgcolor="#ffffff"
width="550" height="400"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>
</object>
Uygun şekilde yapmak için ise:
Kod:
<!--[if !IE]> -->
<object type="application/x-shockwave-flash"
data="dosyamiz.swf" width="300" height="135">
<!-- <![endif]-->
<!--[if IE]>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/
flash/swflash.cab#version=6,0,0,0"
width="300" height="135">
<param name="movie" value="dosyamiz.swf" />
<!--><!---->
<param name="loop" value="true" />
<param name="menu" value="false" />
<p>Bu bir <strong>alternatif</strong> içeriktir.</p>
</object>
<!-- <![endif]-->
Bu 2. yöntem javascript ihtiyacı duymaz.
4 de 3 lük bir çözüm olacaktır.
IE için Active-x fixi
How to avoid activation of Active-X in IE
Ayrıca ie de active-x denetimi için çift tıklama gerekmektedir. Bunun içinse bir fix var.
Bu kodu </head> etiketi üzerine ekleyin.
Kod: <!--[if IE]>
<script type="text/javascript"
src="fix_eolas.js"
defer="defer"></script>
<![endif]-->
Kodu ekledikten sonra http://www.dgx.cz/knowhow/eolas-workaround/fix_eolas.js adresindeki javascripti indirip sitenize yükleyin.
|
|
|
|
|
|
|
Tüm saatler GMT +3 Saat
|
1. sayfa (Toplam 1 sayfa)
|
|
|