Support

 

-  Support Home

-  Knowledge Base

-  Submit Ticket

Browse Knowledge Base

KB Root

    - Components

    - Arsa's Flash News Ticker components

    - Arsa's Flash News Ticker application

    - Navigation Pro components

    - Setting crossdomain.xml file

    - Embedding SWF into HTML page

    - Embedding SWF into HTML pages located in directories with different depth in the site hierarchy

 

Setting crossdomain.xml file

For Navigation Pro and Arsa's Flash News Ticker users it's very important to set properly crossdomain.xml file.

Purpose of crossdomain.xml file is to allow SWF (flash object) to access external sources data. In our case, it's a XML file that loads Navigation Pro components and Arsa's Flash News Ticker.

crossdomain.xml rules:

- crossdomain.xml file must be placed in the public (http) root directory.

- In the crossdomain.xml you need to specify all domain from which you want to allow data access. For example:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="yourwebsite.com" />
<allow-access-from domain="www.yourwebsite.com" />
<allow-access-from domain="subdomain.yourwebsite.com" />
</cross-domain-policy>

Note: Flash object see 'www.yourwebsite.com' and 'yourwebsite.com' as two "different" sources. It is the main reason for using crossdomain.xml.

More about crossdomain.xml can be found on the Adobe web site:
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14213

 

Embedding SWF into HTML page

Regarding recent Internet Explorer patch (Eolas patch), we need to use different way to embed SWF into HTML page than OBJECT/EMBED.

We rate the best solution is the SWFObject distributed by Geoff Stearns.

SWFObject have many usefully options. Some of them describes following article. For full description of the SWFObject visit following web page:
http://blog.deconcept.com/swfobject/

Before we start explanation you need to download SWFobject package from one of the locations:
http://awssoft.com/publicfiles/swfobject1-4.zip
http://blog.deconcept.com/swfobject/#download

Lets start:
-----------
In the following example we use SWF file with name 'ticker.swf' with dimension 300x400 and HTML page placed in the same directory as ticker.swf file.

1) In the swfobject1-4.zip package locate 'swfobject.js' and copy it in the ticker.swf's directory.

2) Open HTML page in favorite text/html editor (e.g. Dreamweaver). Then copy following line inside 'head' section, for example before </head> tag:

<script type="text/javascript" src="swfobject.js"></script>

3) Last step is to place embedding code on place where we need to show ticker.swf movie:

<div id="swfContainer"></div>
<script type="text/javascript">
var so = new SWFObject("ticker.swf", "ntmovie", "300", "400", "7", "#FFFFFF");
so.addParam("quality", "high");
so.write("swfContainer");
</script>

It's all :)
-----------

This is the one of the solutions. There are many solutions on the Internet. One of other interesting solutions is by Adobe.
For more information visit following page:
http://www.adobe.com/devnet/activecontent/articles/devletter.html

 

Embedding SWF into HTML pages located in directories with different depth in the site hierarchy

When we add SWF into HTML document, the addresses to external files inside SWF is relative no more to the SWF, but to the HTML file.

To enable properly work we need to use absolute URLs for all SWFs external files and crossdomain.xml to make external files accessible for SWF.