Tuesday,
29 Sep 2009
SWFAddress 2.4
I'm happy to announce the availability of SWFAddress 2.4 which appears to be the most stable and feature-full version up to date. It fixes some nasty issues that appeared in the previous release and introduces a few interesting additions. Here is the changelog:
- New INTERNAL_CHANGE and EXTERNAL_CHANGE events.
- Support for parameter arrays.
- Improved IE8 support.
- Fixed IE initialization issues.
- Fixed browser communication issues with AS2/AVM2 on Mac.
- Fixed URL decoding for AS1 and AS2.
- Fixed handling of swfobject.createSWF.
- Workaround for WebKit bug 20355.
- Frameset support and corresponding sample.
- All methods dealing with parameters and query strings no longer return empty strings.
The project became pretty mature but we'll continue to consider interesting ideas and requests. More open source goodness is coming soon.
Posted by Rostislav at 9:16 AM in SWFAddress
Comments:
It works great on my IE8 so please provide some more info:
- the exact OS/browser version
- do you have other IE versions installed on the same OS
- can you reproduce the problem with the provided samples
- do you use a web server for testing
One question
If a site was working in ALL cases EXCEPT for windows IE using swfaddress.js 2.1 and swfaddress.as2.4, does it make sense as a first step to upgrade the .js to 2.4?
I tried this but it broke the site further....
i have a problem when using the direct link on the url ex: http://www.domain_name.com/#aboutus
the first frame not loading when the # was included at the url for the first time swf load, and preloader not shown,
thanks
IE: 8
Browser buttons work fine while first visit to website, browser buttons go forward and back as planned...
Go to another URL after clicking through the flash file...
Go back to your SWFAddress site, using the browser buttons...
No SWFAddress functionality, like the code doesnt run when trying to access it.
I am using a .visible based on what the page id is, and its not recognizing it.
Anyone else running into this, or better yet, DO YOU HAVE A FIX? :)
Many thanks for SWFAddress, hands down its a fantastic resource. One piece of advise would be appreciated, I am trying to completely clear the Address Bar of all URL history as it seems on browser refresh that url's are still showing, after trying all relevant methods from the API I still find nothing quite works, any tips?
Cheers,
S
I don't understand what do you mean by "navigator". It sounds like you have a problem with the script initialization. Please, look how this is accomplished in the provided Flex samples (Flex, Family, Tomcat).
It's not always, but offten occured.
I want to reload when user click back button.
But in mac, when call SWFAddress.setValue(), browser reloaded.
How do I fix that?
thank you for your work.
Thanks for reporting this. I updated the download package and now most of the FLA files can be opened with CS3.
@Charlie
Thanks for the good question! These new events are result of many user requests. I still believe that the behavior and the code used should always be the same no matter what the CHANGE event is but there are cases where the new events may help. For example, a highly animated website may execute heavy transition effects only on INTERNAL_CHANGE and skip them on EXTERNAL_CHANGE.
Personally I'd go for something like:
Also this seems to have an error, altho I'm not 100% sure.
I always try to avoid this kind of structure: To me that looks like an typo.
My aptana with jslint complained about these rows, so I wanted to let you know about these potential problems.
The sample works well which means that it doesn't create an infinite loop. The change event is not fired more than once for the same value.
I updated the download bundle few days ago to include a small fix which should solve your DOCTYPE issues.
When the change event is fired, you call a function. In this function you change the swfaddress value, which fires the event again.
I'm literally copying lee brimelow's video tutorial and I just don't see how this is supposed to work.
Also, when I'm doing nothing in my app (just pressing CTRL+ENTER the event already gets fired! why is that?
Some documentation would indeed be handy!
I could not find documentation about new events. I've recently needed them but I have some knowledge lacks . Is there any documentation about external or internal change events?
regards
This caused the situation where the browser address never changed. It all worked internally tho. (Firefox 3.5.3, Flash MAC 10,0,32,18, OSX 10.5.8)
It works on Safari 4.0.3 but so does ExternalInterface.call (tested) but the getUrl fails in Firefox
Otherwise everything is peachy ! :)
I found that in google analytics it doesn’t take “#” to the link it tracks. So when u click “view this page”, it will go to the wrong page, Probebly a Google thing but the generated "#" is unnecessary and it is ugly in the url's to.
Grtz
Hurby
I was just wondering if someone could clear this for me.
I have seen people stating on several blogs that SWFAdress would help in ajax SEO.
Now - I have always considered that javascript generated content is not bot crawlable period.
So - SWFAdress looks like a great tool for links and bookmarking - but I don't understand how it
would help in indexing JavaScript generated content.
Am I missing something?
Do bots index ajax/javascript content?
One question though... is the flashvars bug with swfobject in IE fixed?
http://code.google.com/p/swfobject/issues/detail?id=338
Any thoughts on a fix or what the underlying issue is? I've tried debugging a bit but not having any luck. It's just not firing the EXTERNAL_CHANGE event when it should. If you can throw out any clues about the issue, I could continue trying to debug.
IE outputs an error line8 character 5145, and a weird details mesage as i am using explorer not mozilla:
User Agent : Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)
my explorer version is 8.0.6001.18702
So that would be a problem for the flex template but would work fine with swfobject. (and i tried online and localy).
I hope those infos will help you, IE is really a pain in the a..
thank you for your work.
Yes, it is!
Everyone else please report problems in the proper place and first try to reproduce them with the provided samples.
Then use this doctype, <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Rostislav, thx for a fantastic library!!
Flex
I don't see anything disturbing in the stats for asual.com. You can monitor the requests sent by the browser to http://www.google-analytics.com/__utm.gif and report any specific issue that you find.
@Fred
Thank you for the detailed information. I found the problem which applies only to IE8 Quirks Mode. I will probably update the download files later today.
Rostislav, is this version compatible with swfobject 2.2?
first of all, thanks for this really usefull class!!
I got it all working, but i have some problems with using the nav-arrows of the browser:
if i click all the way back to the beginning, the forward-arrow won't work anymore. If i click through some content and then use the back and forward buttons it works. I have this problem only, when i go back to the very beginning (to the opening of the page).
I you understand my problem . . .
Any thoughts/help would be greatly appreciated!
Just trying to get the CS3 sample version working.
The link to it here
http://www.asual.com/swfaddress/samples/cs3/
Works fine in Firefox mac, and Safari(although the load process hangs for some reason).
This identical sample is included with the 2.4 download, BUT DOES NOT WORK when I try it on a test server.
Is anyone having the same problem? Where can I get an older version? The 2.3 download link seems to be pointing to 2.4 version!
make sure, you call the swfobject before the swfaddress js...
it may help in some case
Don't know where to start. Because the URL isn't updating, no history items are being generated, but if I type a URL, the SWFAddress.CHANGE listener works appropriately and goes to the right page. Tried several combinations of swfobject and swfaddress distributions. An old swf compile still works correctly on the testing server, suggesting it must be something in the Actionscript. Any help would be greatly appreciated.
Deep links inside Flash textfields should call the SWFAddress.setValue(value) method. This is done using a text event in AS3 and with an asfunction in earlier versions.
@Erik
Thanks for the links! I just replaced the interval check with a better fix that was posted in the comments of the FP bug. It's now available in the project repository.
Can you organise as3 classes with package. Let say : com.asual.SWFAddress
THanks.
http://www.killerbadger.com/#/Culture
http://www.killerbadger.com/#/Gallery
http://www.killerbadger.com/#/Contact
No matter which one I try, it just jumps to the home page (http://www.killerbadger.com/#/Badger%20Illustration%20Studio). Is this a common problem, or am implementing incorrectly?
I'm using Firefox 3.5.8.
Mark Cassar
CasaSoft
http://www.casasoft.com.mt
I am still stuck with my problemes under IE. Or could you give more explanations Jesse ?!, thanks a lot. swfaddress rules :)
Just thought I`d post my appreciation to you for your efforts, I'm defintately going to be donating to see this project go further.
Regards and many thanks
For some time there are serious flickering issues with ExternalInterface on Firefox/Mac and there are various articles available on this topic. The code you're citing is a workaround for this problem which usually experienced with heavier Flash websites. How do you experience the situation where the browser never changes?
Is there any way to pass parameters without using a query string?
Thanks again!!!
You can always create an infinite loop if you want to. Overall I don't recommend the approach used in the Lee's tutorial but many people find it useful. Please, check the rest of the available samples and tutorials. The change event is fired when the movie starts because you need to know the deep link value in order to initialize correctly.
@Nicolas
The files in the src folder don't use packages, but the ones in the dist folder are in the com.asual.swfaddress package.
I'd like to handle both change events, just like in the previous version 2.3
Can you help me what could be the problem?
Thanks a lot, and thanks for this great stuff!
I am not using swfObject to embed my flash but i am using the flex template. I read the badpractice doc and i don't see what i am making wrong with ie.
Appart from my problems with IE, congratulations for the good work as swfaddress is really usefull.
Yes!
Now that I've read this website a bit better I understand that there is now an "EXTERNAL_CHANGE" event which makes sure the event doesn't fire when the change comes from within the SWF. This fixes the infinite loop that the video example creates.
Thanks!
I'd like to know if there is any way to use "usual" anchors with SWFAddress ? I'd like to scroll vertically in my page while using SWFAddress. For example, is there any possibility to make this kind of URL "working" :
http://www.my-site.com/index.php#swfaddress_reference#my-anchor
Of course, i tested that and of course it doesn't work, it why i post here ;)
Thank you all, bye.
thanks for any help
this means that SWFAddress no longer has to be 'wedged' into my application's internal workings, right?
my goal is to be able to set a bookmark for browser navigation and sharing while i do all of my usual logic in as3.
then, if the browser does change or a link is used, i have a special parser handling EXTERNAL_CHANGE events.
much better than the old 'funnel' method, in my opinion.
although, i can't get it to work correctly. whenever i setValue, i get the following error:
ArgumentError: Error #1063: Argument count mismatch on com.asual.swfaddress::SWFAddress$/_setValue(). Expected 2, got 1.
at Function/http://adobe.com/AS3/2006/builtin::apply()
at flash.external::ExternalInterface$/_callIn()
at <anonymous>()
looks like the 'internal' argument is missing. any insight?
great addition in concept, please advise how to proceed or if ive misinterpreted the use case for the new event structure...
Any idea? 2.3 had the same issue, 2.2 worked. Uploaded to a webserver is working.
Now that we have the two new change events to work with, does this mean there is a change in best-practice? Previously you have said that all rellevant changes from within the flash should pass through SWFAddress and be handled from its change event, but has this now changed? Given that we can easily tell if it is an external or internal change, should internal changes be handled before they are passed to SWFAddress, then the ensuing INTERNAL_CHANGE event ignored?
I've got an other problem though:
Preloader. Since my swf has a lot of pictures, i needed a preloader, wich loads the swf. And it's working well if you just open in, but if you copy and paste the url, the preloader loads the page again, and the swf jumps to the first state of the movie...
Any idea on how to get this working with a preloader?
Thanks!
I was always a bit frustrated that the examples of swfaddress only showed an extremely simple flash site structure using the main timeline, so as we recently completed a simple micro site using the technology we decided to share the code with the community.
The example has 5 pages inside a structure that allows for innys and outys, all the code is available via a zip file. I am sure it will be of help to newbies.
http://www.succinct-tools.net/
There is a nasty IE bug that changes the title of the page. SWFAddress has a built in interval check that fixes it but still the issue is sometimes visible.
Can you please try getting the SVN copy of the upcoming 2.5 version and check the Events sample. I haven't seen such an error before. Please, provide a simple test case if you still can reproduce it.
Sincerely, Krister.
Also, is there some more comprehensive documentation somewhere I'm missing? The list of functions/methods/etc isn't enough for someone who's just getting into this type of programming. I have to rely heavily on example code to learn how some of this works.
Thanks.
thanks
Excelent work with this tool! Thank you very much.
It would be great to disable automatic tracking that happens on page load.
thanks,
I have a persistant problem with SwfAddress.
It appears that when my flex application is loaded directly to my navigator, change event is transmited to my application. But if it's embedded in an html page, event is only transmitted on page loading, and that's all.
I can change URL, nothing appear..
Could you help me ? I spent already 2 days on the problem and didn't find any solution :(
Thanks a lot
P.S. I post the same problem in 2.3 section, I tried both and nothing change. Thanks !
http://bugs.adobe.com/jira/browse/FP-240
http://code.google.com/p/swfobject/issues/detail?id=293
I can't have deeplink inside the text of my flash site with IE8 and Opera.
They don't reload the page, but i can see the link changing.
So i can't navigate inside the site page too page.
But The menu is working perfectely
Do you know what can be this strange problem?
cheers
fox
When export fla from the supplied samples under CS3 everything is fine but when switch to CS4 then exported swf just stops. Any idea why?
If you follow a deep link:
http://www.asual.com/swfaddress/samples/events/#/about
from another page (my problem is from an email)
then the back and forward buttons will never get enabled until text is entered into the address bar
First, thanks a lot, it's a great library!
I've experienced troubles with google so I've searched a solution and I found this:
http://code.google.com/web/ajaxcrawling/docs/faq.html#flash
It seems that google only crawls links using #! instead of #
In my opinion it's a major concern for SEO
Do you plan to update swfAdress in that way?
Thx
Our SEO solution still works but we're definitely looking forward to upgrade the library in this direction. We already implemented the mechanism in our jQuery Address plugin so now it's just a matter of some free time.
Great!
I try to adapt the Javascript until the next release
Thx ;)
thanks for swfaddress, quite an adventure :).
I noticed that when I click an item on stage twice in a row, only the first click is 'passed' by swfaddress.
Why is this? It could be handy when you don't want to do the same action in yout app twice, but shouldn't that be up to the progammer to decide?
Or is there some property I can set to make every click actually go via swfaddress? I thought maybe strict mode would do the trick, but it doesn't.
Jeff.
I use SEO sample from your site, and works great!
But, I dont like the way of index.php make my Page Title
function swfaddress_title($title) {
if (!is_msie()) {
$names = swfaddress_path_names();
for ($i = 0; $i < count($names); $i++) {
$title .= ' / ' . strtoupper(substr($names[$i], 0, 1)) . substr($names[$i], 1);
}
}
echo($title);
If the link is http://www.serbianightlife.com/srpski/#/beograd/klubovi/ the page title will be SERBIA NIGHTLIFE / Beograd / Klubovi
Can I change this and type the title for my own?
Thanks!
it wrks flawlessly across browsers.
except im having a 2 small problems.
if i open a swfaddress link in new tab,
it opens it without the hash, resulting in a fail.
but if i just clik it, it opens correctly with hash and success.
any ideas why this is happening?
also if i enter the address without the hash, it fails,
example;
website.com/#/books/ --- wrks
website.com/books/ --- fails,
the demo wrks on your website, but when i download the demo and try in my localhost, it also fails.
i tried on live server, still fails.
any suggestions????
it wrks, new tab doesn't tho.
but firebug gives a "opts is not defined"
on 2.4
i got "d.base is not defined"
js/swfaddress/swfaddress-optimizer.js?swfaddress=%2F&base=%2Fbtr%2Fhtml
it defines it.
but, opening a swfaddress link in new tab or in new window still doesn't work,
still doesn't include the #(hash), also typing the link without the hash doesn't redirect to url with hash like in demo.
how is this achieved???
The event is called onchange and it only dispatches when there is an actual change of the address. I'm sorry but you'll have to deal with your case with some extra code.
@Milos
The code you posted creates the titles automatically out of the deep link value. You can put your own logic in there, e.g. dump values from an associative array.
@Dusan
Adjust the provided .htaccess file and ensure that modrewrite works as expected. You can also try to debug the PHP code a little to see where exactly it fails.
new tab wrks,
but it loads index.php inside the index.php instead of the content inside index.php
They call it "asynchronous snippet" I think.. and SWAddress is not calling it because my sites are getting >50% Bounce rate, and before it was <1%
They ask to place the snippet in the <head> tag, but I also tried to place in the <body> for a week or so and nothing...
thanks!
thanks for your excellent work on SWFAddress! I built a framework called deepsplink, which reduces the amount of code (and work) to create a full flash site with deeplink support a lot and has several other benefits. Under the hood SWFAddress is used and it does a great job.
cheers,
max
I have a problem with the sampletutorial: " SWFAdress ActionScript 3 sample for flash" on chrome 5.0 . When you click the buttons in the swf, the swf works fine. But when you click then the backbutton in left corner of the browser then the URL changes, but the content of the swf doesn't.
Is there a fix for this ?
thanks