I am a newbie in webdesign and I´ve been wondering which is the modern way to embed swf objects.
I've been using the following html code:
<object id="flash1" data="presentacion/prototipe.swf" height="300" type="application/x-shockwave-flash" width="500">
<param name="movie" value="presentacion/prototipe.swf" />
</object>
However, I've noticed that some designers use a javascript to embed swf files. Like this one
<script type="text/javascript">
var flashvars = {
};
var params = {
menu: "false",
scale: "noScale",
allowFullscreen: "true",
allowScriptAccess: "always",
allowNetworking: "all",
bgcolor: "#ffffff",
base: "swf/"
};
var attributes = {
id:"flashMovie"
};
swfobject.embedSWF("swf/flash_movie.swf", "flashMovie", "550", "400", "9.0.0", "swf/expressinstall.swf", flashvars, params, attributes);
</script>
It seems that both ways produce the same results but: what are the shorfalls of these methods? which method is the newest ? Are there any compatibility issues regarding the web-browsers?
Thanks in advance.
I've posted this question in stack-overflow too. I don't know exactly where this question should be posted.