Ciao a tutti io penso (!) di avere un problema con SWF Object ed il preload....
in un paio di filmati che ho realizzato ho notato che il preload non funziona o, per meglio dire, compare solo quando è alla fine! Io inserisco il filmato (in 100% di scale) sul file html con SWF Object:
codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="it" xml:lang="it">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Titolo pagina</title>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
var params = {};
params.scale = "noscale";
var attributes = {};
swfobject.embedSWF("fla/filmato.swf", "contenutoAlternativo", "100%", "100%", "7.0.0", false, flashvars, params, attributes);
</script>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
/* hide from ie5 mac \*/
html {
height: 100%;
overflow: hidden;
}
#flashcontent {
height: 100%;
}
/* end hide */
body {
height: 100%;
margin: 0;
padding: 0;
background-color: #FFFFFF;
}
.Stile1 {color: #B7B377}
.style1 {
color: #000000;
font-family: "Trebuchet MS";
}
-->
</style>
</head>
<div id="contenutoAlternativo">
<h1 align="center"></h1>
<h1 align="center" class="style1">Testo</h1>
<p align="center" class="style1">Testo</p>
<h2 align="center" class="Stile1"></h2>
</div>
</html>
Mentre nel 1 frame del movie metto:
codice:
total = _root.getBytesTotal();
loaded = _root.getBytesLoaded();
percent = int(loaded / total * 100);
barra.width=634*percent;
if (loaded == total)
{
gotoAndPlay("intro",1);
}
e nel secondo
gotoAndPlay(1);
NON capisco cosa ci sia che non va....