开发者

Flash Movie not loaded

开发者 https://www.devze.com 2023-02-03 11:47 出处:网络
HI Folks, I\'m trying to show a simple flash movie on my client\'s webpage at ilogicconcepts.com.sg For some reason, the movie simply refuse to load, and d开发者_C百科efinitely is not a permission

HI Folks,

I'm trying to show a simple flash movie on my client's webpage at

ilogicconcepts.com.sg

For some reason, the movie simply refuse to load, and d开发者_C百科efinitely is not a permission issue since I can get to http://ilogicconcepts.com.sg/media/home.swf to view the movie directly.

I've checked firebug and it seems that the page doesn't even try to load the movie. Any idea on this would be very appreciated.

Thank's.


I think you should use SWFObject. You can download the js file and the expressinstall file from here: http://code.google.com/p/swfobject/downloads/detail?name=swfobject_2_2.zip&can=2&q= You need the js file for embedding and the expressinstall.swf automaticly updates the users Flash Player if it is older then required. You can set the minimum player version, add custom variables to Flash and also you can set the parameters and attributes of your Flash movie. For more details see the swfobject docs.

I modified your code, so if you put the swfobject.js file to the js folder and the expressinstall.swf file to your media folder and replace your code with the one below, it should work fine. I tested it on FF3 and Chrome, it works for me.

The code:

<!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"> 
<head> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />   <link rel="stylesheet" type="text/css" href="/css/style.css" /> <link rel="stylesheet" type="text/css" href="/js/lightbox/css/lightbox.css" />  
    <title>Welcome to Ilogic Concepts Singapore.</title> 
    <script type="text/javascript" src="js/swfobject.js"></script>
    <script type="text/javascript"> 
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-3702519-11']);
        _gaq.push(['_trackPageview']); 
        (function() {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
        })();

        function initFlash()
        {
            var flashvars = {};
            var params = {
                allowScriptAccess: "sameDomain"
            };
            var attributes = {};

            swfobject.embedSWF("media/home.swf", "flashcontent-home", "450", "338", "9.0.0", "media/expressInstall.swf", flashvars, params, attributes);
            swfobject.createCSS("#flashcontent-home", "width:450px; height:338px; float:left; margin-right:10px;");
        }
    </script> 
</head> 
<body> 
    <div id="container"> 
        <div id="header"></div> 
        <div id="main"> 
            <script type="text/javascript" src="/js/jquery.js"></script><script type="text/javascript" src="/js/jclock.js"></script>

            <div id="nav-wrapper"> 

                <div class="jclock"></div> 
                <ul id="nav"> 
                    <li><a href="/">HOME</a></li> 
                    <li><a href="/about">ABOUT US</a></li> 
                    <li><a href="/services">SERVICES</a></li> 
                    <li><a href="/portfolio">PORTFOLIO</a></li> 
                    <li><a href="/contact">CONTACT US</a></li> 
                </ul> 
            </div> 

            <script type="text/javascript"> 
                $(function($) {
                    $('<img src="/img/button-bg-alt.png" alt="" />');

                    $('.jclock').jclock({
                        format: '%A, %d.%m.%Y - %H:%M:%S'
                    });
                });
            </script>

            <div id="content"> 
                <div class="heading-page">HOME</div> 
                <div id="homeWelcome"> 
                    <div id="flashcontent-home"></div>
                    <div id="passage"> 
                        Welcome,<br/><br/> 

                        We believe that good design <br/> 
                        is timeless in both <br/> 
                        function and nature. <br/><br/> 
                        Through years of experience, <br/> 
                        we create rooms that reflect <br/> 
                        our clients' individual <br/> 
                        needs and personal style.
                    </div> 
                </div>
            </div> 
        </div> 
        <div id="footer"></div> 
    </div>

    <script type="text/javascript"> 
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-3702519-11']);
      _gaq.push(['_trackPageview']);

      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();

      initFlash();
    </script> 
</body> 
</html>

Good luck, Rob

0

精彩评论

暂无评论...
验证码 换一张
取 消