2 Replies Latest reply on May 15, 2006 9:42 AM by Newsgroup_User

    Help with variable from html to swf

    ][odine
      Hello flash

      I require some assistance if you would be so kind, i have spent nearly 4 hours researching this already and am suffice to say i am stumpped. i know general AS and a good understanding of flash and html, but combining the 2 somewhat of a gray area it seems.

      What i need to do if have a flash navigation menu (which is already built) on the top of a html page (not in a seperate frame). Now i know that i will have to have the page reload with the swf nav hard coded onto it which is fine since its cached but the issue is this -

      The flash nav has a short intro animation that i NEED to skip on every page except the first where it all initially enters. So on every other page other than Home, i want the nav to just show which page is being displayed
      the navigation had 4 items lets call them home - 1 - 2 - 3. on home the animation plays, but if i click on 1 i want 1.html to load up and the swf nav display button 1 as being pressed down (eg, a led inticator is red whilst on the corresponding page) so i want it to just display the page its on, not play the intro

      i am 100% sure i am not the only person to encouter this...but why is it i cannot for the life of me find an answer anywhere. I have looked around macromedia and they suggest things like flashvars in dreamweaver, which is fine...except i dont have a clue how to use them...i think i know how to define them...but as far as referencing them from flash i am useless. I also saw things like " http://www.mysite.com/flash/contact.html?page=4" to pass a variable...but again i would know where to set that (im sure i wouldnt save my file as "contact.html?page=4") i am just soo fed up with this and sick of searching...can anyone PLEASE help me!!! i have flash - dreamweaver.

      and this is only the start because then im going to have to load the whole thing into contribute for the client grr. but thats neither here nor there! thanks in advance whoever brave warrior wishes to lend aid!
        • 1. Re: Help with variable from html to swf
          ][odine Level 1
          i cannot beleive that no one knows...thats rediculous.
          • 2. Re: Help with variable from html to swf
            Level 7

            "][odine" <webforumsuser@macromedia.com> wrote in message
            news:e4a7om$gkg$1@forums.macromedia.com...
            >i cannot beleive that no one knows...thats rediculous.

            I know.

            This is how I do the navigation on my site. If I did it over again, I would
            do it differently, but it works for now.
            http://www.amygart.com

            If you go to my site and click on a link, you will see that the "selected"
            state remains. Looking at the source you can see that when I call my flash
            movie it, the URI looks like this:
            http://www.amygart.com/nav/nav.swf?nocache=1208221478&onpage=design

            The onpage variable is what is used to determine the button to show in the
            "selected" state.

            So, on the same frame as your "intro animation" do a test for onpage (or
            whatever you call your var) and act accordingly. If onpage is not defined
            you play your intro like normal. But, if it is defined, you skip the intro
            and act according to the value. In your case you may want the value of your
            onpage var to be a number corresponding to an array index of an array
            holding refs to your movieclips. In any case, you will base what you do on
            this value.

            Amy

            ps. You posted a response saying "thats rediculous" only 56 minutes after
            your initial post. Sometimes we need more time : )