6 Replies Latest reply on Sep 15, 2010 5:37 AM by corey9

    Embeding in HTML page seems to break AS?

    corey9

      I have a SWF which I had originally published to Flash Player 7. I added some code which requires me to publish to a min of Player 8. When I test the SWF published to Player 8 it works fine. I can even view the SWF directly in a browser and it works fine. My issue arises when I embed the SWF into an HTML page. When embeded into an HTML page the main functionality of the SWF breaks as well as dynamic text no longer displays. Anyone run into similar problems or issues? Any easy fixes? I've tried using the simplest of Embeds i could find and it sill breaks it.

      Much thanks in advance.

        • 1. Re: Embeding in HTML page seems to break AS?
          kglad Adobe Community Professional & MVP

          that's a common problem with faulty/incomplete embedding code.

          • 2. Re: Embeding in HTML page seems to break AS?
            corey9 Level 1

            It is breaking even with the html embed code generated by Flash.

            • 3. Re: Embeding in HTML page seems to break AS?
              kglad Adobe Community Professional & MVP

              post a link to the html published by flash and specify the steps to see the problem.

              • 4. Re: Embeding in HTML page seems to break AS?
                corey9 Level 1

                The two main things that are breaking are the display of dynamic text, where the text just dosent appear. And calls to loadMovie seem to break - my guess is its either making the call not happen at all, or it is being called, but not executing. Both happen immediately upon loading the html page. The site consists of a main "host" swf which loads different SWFs depending on which navigation section was chosen. The main SWF successfully loads into the HTML page and that main SWF successfully makes an initial call to load a hosted SWF. Ive never experienced where how the SWF is embeded into the HTML breaks the internal code of the SWF. Im really stumped.

                 

                Thanks for taking a look!

                 

                ------------------------

                 

                <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
                <head>
                <meta name="description" content="XXXXXXXXXXXXXXX" />
                <meta name="keywords" content="XXXXXXXXXXXXXXXXXX" />

                 

                <TITLE>XXXXXXXXXXXXXXXXXXXXX</TITLE>

                 

                <!-- The below script helps enable the calls which handle the query string from the URL -->
                <script type="text/javascript" src="swfobject.js"></script>

                 

                <script language="javascript">AC_FL_RunContent = 0;</script>
                <script src="AC_RunActiveContent.js" language="javascript"></script>

                 

                <style type="text/css" media="all">
                <!--
                @import url("sitestyles.css");
                -->
                </style>

                 

                <!-- START: GOOGLE ANALYTICS CODE -->
                <script type="text/javascript">

                 

                var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");

                 

                document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

                 

                </script>
                <script type="text/javascript">

                 

                var pageTracker = _gat._getTracker("XXXXXXXXXX");

                 

                pageTracker._initData();

                 

                pageTracker._trackPageview();

                 

                </script>
                <!-- END: GOOGLE ANALYTICS CODE -->

                 

                </head>
                <body bgcolor="#FFFFFF">
                <!--url's used in the movie-->
                <!--text used in the movie-->
                <!-- saved from url=(0013)about:internet -->
                <script language="javascript">AC_FL_RunContent = 0;</script>
                <script src="AC_RunActiveContent.js" language="javascript"></script>
                </head>
                <body bgcolor="#FFFFFF">
                <!--url's used in the movie-->
                <!--text used in the movie-->
                <!-- saved from url=(0013)about:internet -->
                <script language="javascript">
                    if (AC_FL_RunContent == 0) {
                        alert("This page requires AC_RunActiveContent.js.");
                    } else {
                        AC_FL_RunContent(
                            'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0',
                            'width', '650',
                            'height', '530',
                            'src', 'swfnamehere',
                            'quality', 'high',
                            'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
                            'align', 'middle',
                            'play', 'true',
                            'loop', 'true',
                            'scale', 'showall',
                            'wmode', 'window',
                            'devicefont', 'false',
                            'id', 'swfnamehere',
                            'bgcolor', '#C3C9A6',
                            'name', 'swfnamehere',
                            'menu', 'true',
                            'allowFullScreen', 'true',
                            'allowScriptAccess','sameDomain',
                            'movie', 'swfnamehere',
                            'salign', ''
                            ); //end AC code
                    }
                </script>
                <noscript>
                    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="650" height="530" id="swfnamehere" align="middle">
                    <param name="allowScriptAccess" value="sameDomain" />
                    <param name="allowFullScreen" value="true" />
                    <param name="movie" value="swfnamehere.swf" />
                    <param name="quality" value="high" />
                    <param name="bgcolor" value="#FFFFFF" />
                    <embed src="swfnamehere.swf" quality="high" bgcolor="#FFFFFF" width="650" height="530" name="swfnamehere" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
                    </object>
                </noscript>
                <p>XXXXXXXXXXXXXXX</p>
                </body>
                </html>

                • 5. Re: Embeding in HTML page seems to break AS?
                  kglad Adobe Community Professional & MVP

                  post a link to that html.

                  • 6. Re: Embeding in HTML page seems to break AS?
                    corey9 Level 1

                    hmmm - seems like it was a local testing bug? When i pushed the files to a live site, to post a link here, it worked! Im not sure what the issue is with viewing local but it resolves upon viewing from a remote server.