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.
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:
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?
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.
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:
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.
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.
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">
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");
<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()"/>
This is an example of the AS3 code that was confounding the SWF load on the example I gave:
navigateToURL(new URLRequest("http://www.mcintoshlabs.com"), "_blank");
navigateToURL(new URLRequest("http://www.integrahometheater.com/"), "_blank");
Now these are from the same page, the first of which is online right now here:
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,