Using swfobject inside html

63 views Asked by At

I am trying to launch my swfobject inside a vey simple html document :

<div class="video">
    <script src="swfobject.js" />
    <script type="text/javascript" language="JavaScript">
        var flashvars= { loop: 'false',
            menu: 'false',
            quality: 'best',
            movie:'my_viewer.swf',
            autostart: 'false'};
        var params={allowscriptaccess:'always', allowfullscreen:'true', menu: 'false', quality: 'best'};
        swfobject.embedSWF('my_viewer.swf',
            'video',
            '100%',
            '100%',
            '10',
            null,
            flashvars,
            params);
    </script>
</div>

Unfortunately, a white page appear instead (with only my div), looks like the scripts has never been called. I used this code in other projects, and it always work. Does anyone see what is not working properly in there ?

1

There are 1 answers

2
Scipion On

I got my error, I used a class instead of an id in my div ...

EDIT : <div id="video">