5 Replies Latest reply: Feb 17, 2010 5:12 AM by dmeN RSS

    can i change browser address bar as user navigates flash movie?

    sneakyimp Community Member

      I'm looking at some requirements for an upcoming flash project. One requirement is for the browser url in the address bar to change as a user clicks around in the flash movie so that a user might copy/paste said address into an email and another visitor will be brought to the same location.

      Is this possible?  If so, can anyone recommend an approach in flash that might make this easier?

      If not, can anyone explain what the limitation is that prevents this?

        • 1. Re: can i change browser address bar as user navigates flash movie?
          Ross Ritchey Community Member

          Typically, the standard Flash application developed in Flash Professional does not allow this by default.  This is because the Flash application doesn't cause the page to refresh ever, and exists on a single page.  If Flash Professional is a requirement for you to build Flash content, there are several options to enable this, though they can be cumbersome.

           

          If, on the other hand, you use Flex Builder (next version to be titled Flash Builder) to build your application - this is a checkbox in the settings.  Enable it, and this works by default.

          • 2. Re: can i change browser address bar as user navigates flash movie?
            sneakyimp Community Member

            Thanks for your response, Ross!

             

            I have flex builder 3 but haven't used it much yet.  One issue here is that I'll be working with a designer who will most likely be unable to comprehend flex builder.

             

            Some nice folks have referred me to this:

            http://www.asual.com/swfaddress/

             

            I'm guessing that, like any framework, it will be helpful under certain circumstances but will also impose limitations on the design of my flash movie.  I've also been told that I must use WebTrends to facilitate Google Analytics integration.  If anyone has any thoughts on whether these bad boys are going to fight each other, I'd certainly appreciate knowing that.  I'm hoping to put together a proposal shortly.

             

            The flash in this particular project is not exactly going to be rocket science.  Probably some fade-ins and easing and a slideshow type thing.  There might also be background music options and other display options that must be preserved in these urls.

            • 3. Re: can i change browser address bar as user navigates flash movie?
              dmeN Community Member

              You use SWFAddress like you've been told, it's fairly easy to integrate. For instance once you have it available in your project you can just do:

               

              SWFAddress.setValue(whateverValue);

               

              To modify the browser address. And to get the address you just do: SWFAddress.getValue();

               

              I'm not sure about web trends, but I've integrated Google analytics into plenty of sites without it... and I've never had a conflict with SWFAddress.

              • 4. Re: can i change browser address bar as user navigates flash movie?
                sneakyimp Community Member

                Very helpful post dmennenoh!

                 

                I believe the clients are going to want to know where folks linger *inside* the flash file and this is what complicates the google analytics issue. The client demands are still a bit of a puzzle because they refer to both google analytics and also to webtrends, depending on which document I read.

                 

                This page has some interesting info about integrating with webtrends:

                http://blogs.webtrends.com/blog/2009/03/31/tracking-visitors-in-a-rich-media-world-part-v- flash/

                I'm not sure what exactly it means but it would appear that i can send params to webtrends that give some idea of user behavior.  Not having used webtrends, I don't really know what that means when it comes out the other end.

                 

                There's also this tool for communicating with google analytics within your flash code:

                http://code.google.com/apis/analytics/docs/tracking/flashTrackingIntro.html

                 

                The basic idea is that it is possible to inform an analytics tool (webtrends or google analytics) about user behavior inside your flash file.  I'm guessing that I'll need to come up with some kind of roll-your-own user behavior tracking scheme in order to properly set deeplink urls and also to inform the tracking system about user behavior.  I expect this will involve a significant amount of development time and will hamstring the designer a bit -- she's not exactly an actionscript master.

                 

                Seems to me the easiest way to do this will be to create unique, meaningful identifiers for the various 'visitable' sections of my flash movie and handle all navigation through a single function/method.  This method can be called when a button is clicked, when a movie ends, or when my main.swf is first loaded and will take the visitor to the right location.  This function/method will take care of setting the url with swfaddress and will take care to inform the analytics package of the user's action.

                 

                In practice, I suspect it will be more involved than just that, but this is a start.  As always, comments are welcome!

                • 5. Re: can i change browser address bar as user navigates flash movie?
                  dmeN Community Member

                  Yup, in your last paragraph you nailed the idea head on. It will take some time to implement properly, especially if this is your first time doing it, but overall it's fairly painless and makes your site much nicer. It sucks to have looked through a bunch of pages in a site, then hit the back button, and be taken to the previous site and not the previous page. Good luck.