2 Replies Latest reply on Aug 6, 2010 8:18 AM by iranten

    How can I view the different WebPages in same Browser Window?

    learner_7n

      Hi,

       

      I have several buttons on my "Index.swf" file. I am calling the Index.swf file in Microsoft Publisher 2007 and created "Index.html" page.

       

      In the same way I have several individual flash files like, About.swf, Contact.swf, ...... And each files are in seperate webpages like, About.html, Contact.html......

       

      The problem:

       

      Suppose, when I click on a button call "About" on Index.html page. The About.html page opens but in a different window. Not in the same window.

       

      I would like to open a webpage by clicking on a button but in a same window. Don't want to open each webpage on defferent browser window.

       

      How to resolve the problem?

       


      The code for each button is like the following:

       

      About.addEventListener(MouseEvent.CLICK,AboutClickHandler);

       

      function AboutClickHandler(event:MouseEvent):void {
          navigateToURL (new URLRequest ("http://www.About.htm"));
      }

        • 1. Re: How can I view the different WebPages in same Browser Window?
          kglad Adobe Community Professional & MVP

          typically, you would load your swf files using the loader class.  but if you want to change html pages use:

           


           

          About.addEventListener(MouseEvent.CLICK,AboutClickHandler);

           

          function AboutClickHandler(event:MouseEvent):void {
              navigateToURL (new URLRequest ("http://www.About.htm"),"_self");
          }

          • 2. Re: How can I view the different WebPages in same Browser Window?
            iranten

            Hi,

             

            If I may say so, you are going about making a flash web site absolutely the wrong way.

             

            You can have all your sections of your web site in a single swf file, or you can have them loaded as swfs above your main swf.

             

            I suggest the former.

             

            Have just one scene.

             

            Create key frames on your _root time line, for each section.

             

            For eg:

            • Intro
            • About Us
            • Some Stuff
            • Some More Stuff
            • Contact

             

            Each of these will be key frames with relevant MovieClips, each with content pertaining  to it.

             

            Create a layer with buttons (links).

            The buttons (links) on this layer, will navigate to whatever section that you want to....rather than loading a fres swf.

             

            Most importantly create a Pre-Loader...else your audience will be waiting, twiddling thier thumbs.

             

            You need more info...feel free to ask.

             

            Hope that helps

             

            Ranten