18 Dec 2008

SWFAddress 2.2

The new SWFAddress has just arrived after seven months of active development, various contributions and lots of positive feedback from the community. The list of changes includes the following:

  • Refactored JavaScript implementation
  • New SWFAddress.swc AS3 component
  • New CS4 based Splash screen sample
  • New Digg API sample
  • New up() method for easier deep linking path navigation
  • New XSS protection that doesn't affect special characters
  • Support for Internet Explorer 8
  • Support for custom HTTP status messages in the SEO sample
  • Improved title handling
  • Improved unload event handling for IE
  • Updated Rails sample
  • Fixed getBaseURL() for AS3
  • Fixed Safari 2.0-2.0.3 support
  • Build-in fix for the Firefox 3/Mac OSX blinking effect
  • Additional onLoad fix for application/xml content type
  • Fixed optional options parameter for the popup method
  • Cross platform build script
  • Various optimizations

I believe that this new version is pretty stable and won't require an update soon. There are two known Safari bugs (19202 and 20355) that currently affect the project and we can only hope that they will make it's way into the next major release of the browser.

SWFAddress has grown significantly in the last two years and it's very likely that we're going to provide a lite version for users who need just the basic functionality. Very soon the same API will become available for Silverlight and we're also scheduling the development of a jQuery plugin.

Happy holidays!

« Previous Post | Next Post »


Left by at Mon 19 April 2010, 4:15 PM

Blogring for 2.2
Related Blog Entries


Left by Alexey at Mon, 19 Apr 4:15 PM
I've been examining SWFaddress samples and their source files for a long time and yet can't understand why in the example with AS2 preloader doesn't works. It just waits until the whole .swf loads and then shows content.
For example:
Please help.
What I shoud do to have a working preloader on each page?
And thanks in advance!
Left by Ras at Mon, 19 Apr 4:15 PM
Hi, can somebody pease help me:

I am trying to use the SEO example with my own flash project and am experimenting two problems:

1) The stage-size of my project is 900px*968px and I want to have the browsers scrollbar active. BUT for some reason the scrollbar does NOT appear although I changed the parameters from percentage to pixels.... (see below)

2) I would like to have the flash centered on the screen and don't quite know how to achieve that. When using the SEO Code it is aligned to left. I tried using my standard table layout, but for some reason it does not work.... (see below).

Is there a forum you would recommend for SWFAddress? How come this page does not have one?

this is my index.php

div.theflash {
overflow : scroll;
<body bgcolor="#ffffff">
<div id="content">
<h1>">SWFAddress Website</h1>
<li>SWFAddress Website / About</li>
SWFAddress Website / Portfolio
<li>SWFAddress Website / Portfolio / 1</li>
<li>SWFAddress Website / Portfolio / 2</li>
<li>SWFAddress Website / Portfolio / 3</li>
<li>SWFAddress Website / Contact</li>
<div><?php swfaddress_content(); ?></div>
<div class="theflash">
<script type="text/javascript">
// <![CDATA[
(new SWFObject('<?php swfaddress_resource('/website.swf?datasource=datasource.php'); ?>', 'website', '968px', '900px', '8', '#ffffff', 'high')).write('content');
// ]]>

Thanks for your support!

Kind regards
Left by Matty B at Mon, 19 Apr 4:15 PM
I've been doing some tests with this outstanding script and wanted to know if anyone else couldn't get the browser forward button to work with IE8?

I'm using SWFAddress 2.2 with SWFObject 2.1

It works with Firefox 2 and Safari 3 but with IE8, I can go backwards -- just not forwards.

Here are links to my example:
This one is using SWFObject 2.1 Here

This one is using SWFObject 1.5 Here
Left by Cristi Baluta at Mon, 19 Apr 4:15 PM
Last version was refreshing the html to my home if i had some characters in the url like: '!&()"
Does this version behave the same? i see on wich also uses swfaddress that does not have this problem, maybe they have a modified version.

Btw, just wanted to let you know that i'm maintaining the port for haXe: , i should upgrate it soon, i just heard about 2.2
I never realy figured it out how to use the SEO with it, but i'll try harder with this version. last time i got a nice 250Gb trafic for a site that normaly have only few Gb
Left by Cristi Baluta at Mon, 19 Apr 4:15 PM
In fact i rechecked and is only a problem with my haXe port. Do you have any ideea what went wrong? here's a sample:

and then modify the url to have an ' like:'/

Left by Rostislav at Mon, 19 Apr 4:15 PM
There is an IntKit sample that targets Flash Player 7 and used AS2.
Left by Rostislav at Mon, 19 Apr 4:15 PM
This was valid for 2.1 but should be fine in 2.2.
Left by Cata at Mon, 19 Apr 4:15 PM

Can you tell me the address for the forums? I can't find it anywhere :(

Left by marc at Mon, 19 Apr 4:15 PM
Nice! Posted it in the news of Flashforum... Keep on the nice work.
Left by kristof at Mon, 19 Apr 4:15 PM
Does it work for flashplayer 7.0, AS2.0 ? It does'nt seem to work right here. Is there a solution for this?
Left by Rostislav at Mon, 19 Apr 4:15 PM

The datasource.php needs to be processed both by the index.php and the movie.swf. The datasource parameter that movie.swf accepts just externalizes the datasource.php reference that otherwise needs to be hard coded in the movie.fla.
Left by Elliot Rock at Mon, 19 Apr 4:15 PM
Question: Do you have to use SWFObject to embed your .swf?
Left by Sasa at Mon, 19 Apr 4:15 PM
Rostislav thank you for your kind help. It was my mistake with IE7. I had IE7 standalone version which is obviously buggy. I have tried on another computer with normal installation of IE7 and everything is working great! Sorry for bothering.
Left by andy at Mon, 19 Apr 4:15 PM
hi everyone!
can someone help me? i´m trying to use swfaddress, i´m using de adobe example (as 2.0), but the fact is i don´t like build pages based on frame navigation, i like build single frame sites, i change the "gotoAndStop('$' + value);" to a function , but back button does´t recognize the history.

here de code:

var value2:String = '';

SWFAddress.onChange = function() {
var value = SWFAddress.getValue();
var path = SWFAddress.getPath();
var id = SWFAddress.getParameter('id');

// this is the function that i swapped
navegar ();
var title = 'SWFAddress Website';
var names = SWFAddress.getPathNames();
for (var i = 0; i < names.length; i++) {
title += ' / ' + names[i].substr(0,1).toUpperCase() + names[i].substr(1);
var id = SWFAddress.getParameter('id');
if (id != '') {
title += ' / ' + id;

function about () {
b1_mc.gotoAndStop (2);
function work () {
b2_mc.gotoAndStop (2);
function contact () {
b3_mc.gotoAndStop (2);
function home () {


function navegar (){
switch (value2) {
case 'about' :
about ();
case 'work' :
case 'contact' :
contact ();
b1_mc.onRelease = function () {
value2 = 'about' ;

b1_mc.onRollOver = function () {
value2 = 'about' ;
b1_mc.onRollOut = function () {
b2_mc.onRelease = function () {
value2 = 'work' ;

b2_mc.onRollOver = function () {
value2 = 'work' ;
b2_mc.onRollOut = function () {
b3_mc.onRelease = function () {
value2 = 'contact' ;

b3_mc.onRollOver = function () {
value2 = 'contact' ;
b3_mc.onRollOut = function () {
thanks in advance and thanks to asual for this great tool
Left by Rostislav at Mon, 19 Apr 4:15 PM
Most of the samples use a small c.swf which fixes the preloading. The Adobe sample just misses this workaround.

Few comments above I asked you to use the forums which are much more appropriate for code samples and discussions. Your problem is not that related to SWFAddress anyway.

@Matty B
I will have to check the IE8 support again. Someone previosly reported problems because of a lacking DOCTYPE declaration but this doesn't seem to be the case with your tests.

I hope I have helped you in the forums.

Check the MTASC sample for an AS2 popup test case. It works here and I don't rememeber if there was anything specific. The WMODE parameter was used to enable Firefox support.
Left by Andrei Potorac at Mon, 19 Apr 4:15 PM
Oh boy, I just managed to get 2.1 in the current project I'm working on, and you guys released it just now. That's hilarious! :)

But many thanks for the hard work, I'll have to do my part now. :)
Left by Sasa at Mon, 19 Apr 4:15 PM
Does anybody knows any reason why swfaddres.href is not working? Everything works great for me except that. I have used:


Any idea?
Left by Andrei Potorac at Mon, 19 Apr 4:15 PM
Many thanks for your emails and the fix. Indeed that was the issue and now it's working perfectly! THANKS! :D
Left by Andrei Potorac at Mon, 19 Apr 4:15 PM
Guys, the clipping on FF 3 on the MAC isn't fixed if used with SWFObject 2.1 :(
Left by ben at Mon, 19 Apr 4:15 PM

I'm using swfaddress but i don't understand why the swf file is called liket this:


and not a simple


the datasource.php seems to be processed in the main index.php, so why do we need to make a call from the swf?

Thanks for your help
Left by Ben McMaster at Mon, 19 Apr 4:15 PM
I am having the same issue as @CG at Sat, 21 Feb 5:03 PM:

The html domain is different than the swf domain, and I am getting a security error. Rostislav, you said: @CG I hope I have helped you in the forums.

Where is the forum. I would love to see more info on this issue.

Thank you!
Left by Rostislav at Mon, 19 Apr 4:15 PM
Can you please check if this issue is reproducible in every browser? You can also test it in the MTASC sample (AS2) and CS3 sample (AS3). For some browsers you have to use the problematic WMODE in order to bypass the popup blocker.
Left by CG at Mon, 19 Apr 4:15 PM
Hi there,

I'm finally using SWFAddress and absolutely LOVE it. But I've run into an issue.

Is it required to have the SWF file and the HTML file embedding SWF to be on the same domain?

I have a project where the SWF is on a different domain from the HTML embedding it. The problem is SWFAddress is not changing the back/forward browser history, but is still changing the Title. When I have both the SWF and the HTML are on the same domain, everything works fine.

I dug through the SWFAddress.js, placing in alerts, and found the failure to occur at:

this.dispatchEvent(new _31.WEBAddressEvent(_60));

If I replace that with:

var test = this.dispatchEvent(new _31.WEBAddressEvent(_60));

...I get no alert box when the SWF and HTML are not on the same domain. I get an alert true if the SWF and HTML are on the same domain.

Any help would be much appreciated.
Left by Ben Fhala at Mon, 19 Apr 4:15 PM
I've been adding a small (very small) Tweak to SWFAddress since the first time i used it in its first version well the tweak evolved as so did SWFAddress has :P so i thought its time to share it :P its very small and very simple in the last vertion of swf address i just modify the setValue method to look like this:

public static function setValue(value:String,isDispatchEvent:Boolean=true):void {
if(isDispatchEvent) _dispatchEvent(SWFAddressEvent.CHANGE);

why..makes it easier to change the URL without it dispatching an event so i don't need to put extra logic in the event listener and i can make the call any time i wan to dispatch or not an event for change if i'm working internally lowering the need for extra logic in the change event ...

its really not that what i do is a better way just another way that for me seams more simple ;) any ways its nice to have that option for users that don't want the swfAddress to be the hub.

good job, great code! ;)
Left by michael at Mon, 19 Apr 4:15 PM
i have noticed that if you try to set the value from a child of the mc/timeline in which you've imported swfaddress, it doesnt change, so could be it

you're sure you told it to .SetValue()?

you can download a working sample and just change that to whatever you like
Left by Rostislav at Mon, 19 Apr 4:15 PM
The link to the forums is on the main SWFAddress page:
Left by phil at Mon, 19 Apr 4:15 PM
I had some issues getting this to work with swfobject 2, I wrote post on my blog about I resolved them
Left by Sasa at Mon, 19 Apr 4:15 PM
Hi, I have problem in all browsers. Currently my site works only in Firefox because I have messed up statcounter code. I can't fix it right now because I don't have access to it from home. Please check my site:
My site is based on code from

BTW I'm using wmode transparent.
Left by Rostislav at Mon, 19 Apr 4:15 PM
I just tested the samples I mentioned earlier in two different copies of IE7 and they work as they should. Don't use getURL together with ExternalInterface (SWFAddress) because it causes bad issues especially with IE.
Left by Rostislav at Mon, 19 Apr 4:15 PM
@andy and Ras
Please, ask questions like these in the SWFAddress forums.
Left by Rostislav at Mon, 19 Apr 4:15 PM
@Elliot Rock
You can use SFWObject 1.3-2.x, UFO, AC_RunActiveContent or swfIN. If you want to embed your SWF differently then you just need to call SWFAddress.addId(movieId) in order to register it.
Left by IzB at Mon, 19 Apr 4:15 PM
Working with swfaddress 2.2, coherence sample.
I'm trying to rework at previous site that has some calls to a mysql database:
Q1: Is there a way to execute/parse php in the xml files containg the "content"?
Q2: If not, is there a way to call these functions in the xml file it self? That is, make mysql calls in xml files?
here a sample of the code I use in php:


$query= mysql_query("SELECT * FROM plugin_news WHERE id = '".$id."' AND public = '1'") or die(mysql_error());

while($row=mysql_fetch_array($query)) { ?>

<h1><?php echo $row["topic"]; ?></h1><p><?php echo $row["txt"]; ?>



<?php } ?>

<?php } elseif ($action == "old") { ?>


$query= mysql_query("SELECT * FROM plugin_news WHERE public = '2' ORDER BY pubdate ") or die(mysql_error());

while($row=mysql_fetch_array($query)) { ?>
<h1><?php echo $row["topic"]; ?></h1>

"><?php echo strip_tags(substr($row["txt"], 0, 150)); ?>...


<?php } ?>


<?php } else { ?>


$query= mysql_query("SELECT * FROM plugin_news WHERE public = '1' ORDER BY pubdate ") or die(mysql_error());

while($row=mysql_fetch_array($query)) { ?>
<h1><?php echo $row["topic"]; ?></h1>

"><?php echo strip_tags(substr($row["txt"], 0, 150)); ?>...


<?php } ?>

&nbsp;Read older news

<?php } ?>
Left by IRFAN at Mon, 19 Apr 4:15 PM
I don't whether it's an bug or not but whenever there I type more than 1 (#) symbol in the url, for example then my browser starts generating multiple recursive requests to web server automatically. My only concern is that this behavior could cause a DOS attack if used negatively. Anyone can tell me if there is any workaround to avoid such a behaviour?? Would be greateful.
Left by Quentin at Mon, 19 Apr 4:15 PM
I'll update my latest mini-site:
Left by Aaron at Mon, 19 Apr 4:15 PM
To work in IE8, add the following to your <head> section of your page
<meta http-equiv="X-UA-Compatible" content="IE=8"/>

Left by Rostislav at Mon, 19 Apr 4:15 PM
I like MooTools and it depends on the time that I will have available. Such plugins will very likely target only Ajax.
Left by amoslanka at Mon, 19 Apr 4:15 PM
any plans for a MooTools plugin too?
Left by cicit at Mon, 19 Apr 4:15 PM

I am having trouble with SWFAddress by Asual, I am using as2

The thing is if you use
then when people type URL :

However what if when people just type --> without the slash
I want them to keep referring the about sections of the site.

is it something we have to do in the logic of the event handler:
SWFAddress.onChange = function() {

Can somebody show me how to turn this trick? I am a noob.

Left by Rostislav at Mon, 19 Apr 4:15 PM
@Ben Fhala
Thanks for sharing your tweak. This topic has been discussed before and my vision for the implementation can be found in the forums. Unfortunately it will probably become a part of the next major release because the upcoming 2.3 is almost ready.
Left by t416 at Mon, 19 Apr 4:15 PM
I've been working on a website using flash AS2 and swfaddress 2.2 using the popup method on a button to open a pop-up window. It seems to work in firefox 3 without any issues, but appears to fail in IE 7.
I'm guessing that I'm doing something wrong, or there is already a work around for this I don't know about. If there is a solution/work around in any of the documentation or online anywhere I would love to be pointed in it's direction.


Left by Andreas at Mon, 19 Apr 4:15 PM
Hi guys, the code does not work for us on IE6 (and we found a lot of users still have it). The reload starts the whole app again incl. login. And when just opening an information window telling the user to better upgrade to another user on some machines this created an endless loop of opening windows.... how does it work for you on IE6? Is there a better workarond?
Left by walter at Mon, 19 Apr 4:15 PM
any news about the fore button bug?
Left by Glendon at Mon, 19 Apr 4:15 PM
I am brand new to SWFAddress. I have followed several online tutorials I have found, and I am able to get the Title bar to react to button clicks. However, the address bar does not change, and there is no history created. The Back button stays unlit.

I know that the code is working, because if I remove any piece of it, the Title no longer changes. But having the Title change with no functionality of the Back button or address bar is pointless.

I have the SWFObject and SWFAddress in the correct order, and an id:name attribute. I know those are common errors I have seen.

Any ideas what I'm missing?
Left by Sasa at Mon, 19 Apr 4:15 PM
Thanks Rostislav, I have fixed everything but however popups don't work in IE7. Is there any cure for this? You have mentioned something about wmode. How to bypass popup blocker?

It does not matter whether I use getURL or SWFAddress.href or even It does not work in IE7 when i set second parameter to "_blank", "_parent" always works.
Left by Rostislav at Mon, 19 Apr 4:15 PM
In order to prevent an XSS issue we restricted the number of allowed characters in version 2.1. Now it's implemented differently and you just need to upgrade your swfaddress.js.

Thanks for doing a haXe port! If you need support, please contact me directly.
Left by Rostislav at Mon, 19 Apr 4:15 PM
The FF3/Mac fix requires a valid movie ID which is also needed in order to have the browser Back/Forward buttons working.
Left by AlecOliver at Thu, 27 Oct 7:40 PM
I implemented the AS3 versoin from this site:

and everything seems to work except the back forward buttons on certain browsers.

I have tested these
OSX Chrome == back forward fails
OSX Safari == back forward fails
OSX FF == back forward works

WIN XP Chrome == back forward fails
WIN XP EI == back forward works
WIN XP FF == back forward works

any help would rock, thanks

Left by Paul at Wed, 7 Dec 5:56 PM
I have created a site using the deeplinking files. Locally I have the site working. As I click items, the link changes. I can enter links the change the items loaded. The problem is, when I take the files online I either get a "get flashplayer" thumbnail or otherwise it will load the site as normal but without deep linking functionality. What am I doing wrong here?
Left by Paul at Wed, 7 Dec 6:00 PM
Further to the above, it is adding wwwroot into my web field. I am thinking this may be part of the problem.
Left by Marlon at Sun, 16 Sep 3:36 AM
Hi there !Use SWFAddress or URLKit to rewrite url of your page but it’s usufel only for RIA or site usability, not for SEO because HTML is the same for all pages, change only the page url.Actually it's not totally true. I usually put an .htaccess file on my webserver that takes the query string in swfaddress format. I parse it and send it to the php file who return the right html formatted content from url arguments.So when spiders come to the main page, they find links in swfaddress format and when they check those links, the server send the right pages with the right content !Then you can find specific pages in google, and if you click the link, you arrive on the swfaddress url which redirect your flash to the requested category.Hope this help



Blog Search

Blog Categories

Blog posts

Recommended sites