6 Replies Latest reply on Mar 29, 2011 10:12 AM by AdeptDigital

    SWF files not loading onto page in Catalyst output.

    AdeptDigital Level 2

      Hello,

       

      This is a new one that I have not yet seen.  I have a large assortment of SWF files set up in Scroll Panes and they are not loading up when I check the project using Firefox or Safari.  The site is here:

       

      www.electronic-lifestyle.com

       

      Go into any page linked from the top row and then hit a sub page.  When you see a scroll bar come up on the right side of the film strip yet nothing inside the film strip you will see the issue.

       

      This is really serious and could screw up my entire project so any advice would be really helpful.  I need to figure out why the SWF files are not loading in on the browser with the files from the server when they work just fine using the local deploy files.  Everything works just fine from the machine but when I try to get it to download from the server nothing.

       

      All of the SWF files are built in Flash CS5 using AS3 and contain some simple links and commands.  Some of the SWF files are coming up just fine, it is just the latest batch of files I have uploaded that are giving me the problem, but only off the server.  The same files work just fine in local mode.

       

      Thanks in advance,

      Brett

        • 1. Re: SWF files not loading onto page in Catalyst output.
          AdeptDigital Level 2

          Another thing.

           

          The files that are not showing up from the server where recently changed out with their former versions to incorporate links to various websites.  The only difference that I see between the two is the addition of the AS3 code creating the links.  These are not however the only files with code.  I have several SWF files up and running on this site that use AS3 for various different commands.  I do not think the AS3 code is the problem but since I have no idea what the problem is I thought I should mention it.

           

          Thanks

          • 2. Re: SWF files not loading onto page in Catalyst output.
            AdeptDigital Level 2

            I just tried to replace the new SWF with the old and it works.  The problem has to be in the SWF file but I cannot figure out the issue.  The only difference is the presence of the AS3 code, the Publish settings are identical.  The only thing in the code is a simple snippet on some buttons to link certain images to the corresponding website.  For example:

             


            Wharfedale_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage);

             

            function fl_ClickToGoToWebPage(event:MouseEvent):void
            {
                navigateToURL(new URLRequest("http://www.wharfedale.co.uk/"), "_blank");
            }

             

            I didn't even write this!  This is the code generated from the Code Snippets window.  How can this be knocking the SWF off the browser window?

             

            Brett

            • 3. Re: SWF files not loading onto page in Catalyst output.
              Chris W. Griffith Adobe Community Professional

              Try removing the , "_blank" from the generated code. That is telling browser to open the link in a new window. Some pop-up blockers might prevent this, thus causing the error you are seeing. This is just a guess.

               

              Chris

              • 4. Re: SWF files not loading onto page in Catalyst output.
                AdeptDigital Level 2

                Chris,

                 

                Thanks for the tip but I just figured out the problem and you are not going believe this.  I removed the buttons from two of the scroll panes and replaced them with buttons made in Catalyst and the problem magically went away.  Take a look at this page:

                 

                www.electronic-lifestyle.com/SpeakSEL-OLD/Main.html

                 

                The first three pages work just fine but the Third and Fourth pages (Outdoor & Subwoofer) will not load the SWF.  The ONLY difference between these two pages are the buttons in Flash.  It would seem that buttons will create a destructive error that prevents the SWF from loading.

                 

                If this pans out then the developers for Adobe really missed a big one with this.  I have over 47 pages that now need to be rebuilt because I assumed that a button built in AS3 would not interfere with the SWF load.

                 

                Now this isn't something that happens all the time, I have several SWFs in this site that use buttons and work just fine but they are nested in Movie Clips and they all have to do with timeline controls rather than opening another URL.  Maybe the "_blank" tag is the issue but I am required to get the user to a different page by the client's request.  I can't very well go back to the client and tell him that Catalyst has an issue with that very normal request.

                 

                Anyway, thanks for the suggestion, I am spending the rest of my day republishing my SWFs without buttons just to remake them in FC.  BTW, the real kick in the head is that the SWFs with the buttons work on the local files, its when you upload to a server that everyting seems to fall apart.

                 

                Brett

                • 5. Re: SWF files not loading onto page in Catalyst output.
                  Chris W. Griffith Adobe Community Professional

                  Hum, ActionScript is just ActionScript. Can you post the code snippet from the Flash Catalyst side along with the Flash Professional snippet. There will be a difference, and that will be the source of the issue.

                   

                  Chris

                  • 6. Re: SWF files not loading onto page in Catalyst output.
                    AdeptDigital Level 2

                    Chris,

                     

                    This is not an apples to apples comparison but I think it will Illustrate the differences.  This is a sample of code from Catalyst that works:

                     

                    <?xml version="1.0" encoding="utf-8"?>
                    <s:Group xmlns:s="library://ns.adobe.com/flex/spark" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:fclib="com.adobe.flashcatalyst.components.*" xmlns:d="http://ns.adobe.com/fxg/2008/dt">
                        <fx:Script>
                            <![CDATA[
                                protected function mac_btn_clickHandler():void
                                {
                                    navigateToURL( new URLRequest( encodeURI("http://www.mcintoshlabs.com")), "_blank");
                                }

                     

                                protected function integra_btn_clickHandler():void
                                {
                                    navigateToURL( new URLRequest( encodeURI("http://www.integrahometheaters.com")), "_blank");
                                }

                     

                            ]]>

                     

                        </fx:Script>
                        <fclib:SWFController loadForCompatibility="true" source="assets/images/ElectronicMain2c.swf" x="0"/>
                        <s:Button skinClass="components.Button1" x="0" y="1328" d:userLabel="Mac_btn" click="mac_btn_clickHandler()"/>
                        <s:Button skinClass="components.Button1" label="Button" x="0" y="1768" d:userLabel="Integra_btn" click="integra_btn_clickHandler()"/>
                    </s:Group>

                     

                     

                    This is an example of the AS3 code that was confounding the SWF load on the example I gave:

                     

                     

                     

                    button_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage);

                     

                    function fl_ClickToGoToWebPage(event:MouseEvent):void
                    {
                        navigateToURL(new URLRequest("http://www.mcintoshlabs.com"), "_blank");
                    }

                     

                     

                    button_2.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage_2);

                     

                    function fl_ClickToGoToWebPage_2(event:MouseEvent):void
                    {
                        navigateToURL(new URLRequest("http://www.integrahometheater.com/"), "_blank");
                    }

                     

                     

                    Now these are from the same page, the first of which is online right now here:

                     

                    www.electronic-lifestyle.com/AS/Main.html

                     

                    This particular code is used on the Electronics page.  When I look at the two side by side it seems there are some syntax differences but I do not know enough about AS3 to tell what the important differences are.

                     

                    Thanks for looking,

                    Brett