2 Replies Latest reply on Feb 5, 2008 2:54 PM by janericster

    html link to loaded MC?

    janericster Level 1
      actionscript newbie here...couldn't find any info on this using this forum or google....so hoping someone will know a solution:

      Created a full intranet site using all Flash. The "homepage" and menu is the main SWF and each menu item loads an external swf in an empty MC on the stage.

      Works fine until people requested HTML links to go straight to specific sections. Is this possible? I would need the homepage base swf to load with any of the specific subsections preloaded -- accessible by specific URLs. Not sure if this is easy with some added actionscript or if I need to totally redo the site.

      Any advice would be greatly appreciated (and I'm a script newbie -- so go easy!)

        • 1. Re: html link to loaded MC?
          RossRitchey Level 4
          All you need to do is use your server language (or javascript) to be able to grab variables appended onto the url ( http://www.mysite.com?var=myvalue) and then pass that information into the swf at runtime, using the flashVars item, or even simply with the url. ( http://pathtoswf/myswf.swf?var=myvalue)

          This variable would house the name of the section you want to automatically go to.

          From there, you need to add some logic to your menu swf. If you see that variable, intitialize your page change function to load up the section.

          So, your URL would look like http://mysite.com?sect=mysection

          The scripting (javascript or something server-side) would grab that "sect=" string and inject it into your flash object.

          Then, your flash object would recognize that the variable is set, and load up the proper section.
          • 2. Re: html link to loaded MC?
            janericster Level 1
            Thanks rritchey! This sounds very intriguing (although I'm totally baffled as I am not a coder by any means).

            I'll use your info and try to figure this out. The site is on a Windows server and the menu uses one of the FlashLoaded.com menu components. You sure make it sound easy!