5 Replies Latest reply: Jan 16, 2009 4:25 PM by clbeech RSS

    Linking to specific frames

    x_defect Community Member
      I have a website with a javascript/Spry navigation bar. I was planning to have the static elements of the site done in Dreamweaver (the outer shell, basically), and have the main body of the page be in Flash.

      If I had the body of the site in a Flash file, each page in a different frame, how would I link to a specific frame from my HTML file?
        • 1. Re: Linking to specific frames
          clbeech Community Member
          look into the ExternalInterface class - it has method which will allow you to set up communication between JS methods and AS methods.
          • 2. Re: Linking to specific frames
            x_defect Community Member
            Thanks for the tip.. this somewhat explains what I'm trying to do, but I'm new to javascript and as3.0 so it doesn't make a whole lot of sense :/
            http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Liv eDocs_Parts&file=00000343.html#wp126216

            Where would this code go exactly, and what is static/what do I customize to my own needs?

            To use as an example, say I have a link in my JS menu bar that says "Info", and I want it to gotoAndStop at a frame in my flash file labeled "infopage". How would I do this?





            quote:

            Originally posted by: clbeech
            look into the ExternalInterface class - it has method which will allow you to set up communication between JS methods and AS methods.


            • 3. Re: Linking to specific frames
              whattevva Community Member
              I'm not sure what you're trying to accomplish, exactly, but my first recommendation would be to not use frames - they are problematic on a standard website - a compounded problem in what you're trying to do...

              I'm also not clear on what the flash movie is in the content area - are there going to be different "scenes" in your flash movie, that when you select a button on your top navigation, it takes you to a new scene in your flash movie? If that's the case, why not just build a separate flash movie for each html page you're linking to instead of trying to link external from html to inside of your flash movie - seems like a painfully difficult task for something that can be accomplished easier. Also, it depends on what your content area will consist of...

              For instance, if you have a cool intro movie for the homepage only, then the "guts" of the secondary pages are just text and photos, you may consider not using flash much beyond the homepage...

              It all depends on what your intentions are, but the best application of flash would be either to build all of your links inside of the flash movie, or just use the flash movie(s) in the content area of the separate html files...
              • 4. Re: Linking to specific frames
                x_defect Community Member
                the frames I was referring to were those in my FLA file, not HTML frames.

                the reason for wanting to have the main content in a single Flash file is for a smooth transition from one page to the next - i was hoping to have the navigation bar and other static elements remain on the page with only the content (in the swf) changing. Each page in the content area will contain an image and a small amount of text.

                I'd do separate Flash files for the content, but I was trying to avoid having to have the swfs load up every time a new link is clicked - i don't want it to look choppy, if that makes sense?
                • 5. Re: Linking to specific frames
                  clbeech Community Member
                  yeah x - it sure does make sense. another reason to structure things in this manner would be to save on bandwidth - and like you said, to save on 'load' time which can annoy users - your reasons are perfectly valid.

                  however, it's also not a bad idea to make an 'all Flash' page/site wherein your content is navigated from within a single file, that also includes the nav bar - also it is not uncommon to use frame navigation, and there's nothing wrong with that for what you're trying to do - it is 'not' problematic (unless you use multiple timeline 'scenes' - avoid that)