Variable problem - from address

Ask a Question related to Macromedia Flash, Design and Development.

  1. #1

    Default Variable problem - from address

    Hello all.
    I've got a problem passing variables to flash from the address bar.
    At the moment my link is like this:

    [url]http://www.xyz/Heiro.html?fname=TOM[/url] ("TOM" makes no difference either)

    but when the SWF file in Heiro.html loads the variable fname (or
    _root.fname) is listed as 'undefined'.

    I'm trying to use the variable in code like this:

    _root.message = "Dear "+_root.fname+" below is your name hieroglyphs."
    _root.L1.gotoAndStop(fname.substring(0,1));

    and I can't for the life of me work out what's going wrong. It looks
    like Flash isn't grabbing the variable, but I'm sure that I've used
    this method before.

    Any advice? (Using MX2004).

    Cheers.

    Tom
    Tom Guest

  2. Similar Questions and Discussions

    1. Db address problem
      http://www.healthhokkaido.com/files/catalog_getCategories.cfm I have checked my server and this file exists and i have connected the dsn...
    2. New client potential problem with GC and IP address change....
      I have a new client that is moving all of his office machines to my town. He has contracted me to get him up and running but the problem is that he...
    3. Problem with Email address Hyper subject-
      Hello In my website , I created an email address hyperlink- First thing it ask is the mailto in wich i place my email address. Than it ask for the...
    4. problem with email link. and URL Address
      Hello All: There seems to be a problem with the following HTML Email link. <a href="mailto:?Subject=Search For: <%...
    5. Address book import problem
      Hi Gene, Try copying directly from the floppy to the hard drive, then import the file from there. -- Best of Luck, Rick Rogers aka...
  3. #2

    Default Re: Variable problem - from address

    .... anyone?
    Anyone at all?

    [email]contact@tgrinsted.co.uk[/email] (Tom) wrote in message news:<1db0534e.0409011356.e9dc1b3@posting.google.c om>...
    > Hello all.
    > I've got a problem passing variables to flash from the address bar.
    > At the moment my link is like this:
    >
    > [url]http://www.xyz/Heiro.html?fname=TOM[/url] ("TOM" makes no difference either)
    >
    > but when the SWF file in Heiro.html loads the variable fname (or
    > _root.fname) is listed as 'undefined'.
    >
    > I'm trying to use the variable in code like this:
    >
    > _root.message = "Dear "+_root.fname+" below is your name hieroglyphs."
    > _root.L1.gotoAndStop(fname.substring(0,1));
    >
    > and I can't for the life of me work out what's going wrong. It looks
    > like Flash isn't grabbing the variable, but I'm sure that I've used
    > this method before.
    >
    > Any advice? (Using MX2004).
    >
    > Cheers.
    >
    > Tom
    Tom Guest

  4. #3

    Default Re: Variable problem - from address

    > > I've got a problem passing variables to flash from the address bar.
    > > At the moment my link is like this:
    > >
    > > [url]http://www.xyz/Heiro.html?fname=TOM[/url] ("TOM" makes no difference either)
    > >
    > > but when the SWF file in Heiro.html loads the variable fname (or
    > > _root.fname) is listed as 'undefined'.
    > >
    > > I'm trying to use the variable in code like this:
    > >
    > > _root.message = "Dear "+_root.fname+" below is your name hieroglyphs."
    The html page Heiro.html is not passing your variable to your Flash movie.
    To do that, you need to use an ASP, PHP, Perl or whatever page to take the
    variable from the URL and insert it into the <embed> or <object> tag you use
    to load the Flash movie. It's extremely simple but it does have to be an
    'active' page, not just html.

    Look up Flashvars in google for more, although how you create your new
    Heiro.[asp|pl|blah] page is up to you and your server; ask here for more.

    hth

    h


    h Guest

  5. #4

    Default Re: Variable problem - from address

    Thanks very much.
    It would be useful if you can point me in the direction of a good
    example or tutorial or whatever.
    But if it's an effort don't worry about it.
    T

    "h" <h@howiem.dontspam.meee.com> wrote in message news:<4145bb14$0$19225$afc38c87@news.easynet.co.uk >...
    > > > I've got a problem passing variables to flash from the address bar.
    > > > At the moment my link is like this:
    > > >
    > > > [url]http://www.xyz/Heiro.html?fname=TOM[/url] ("TOM" makes no difference either)
    > > >
    > > > but when the SWF file in Heiro.html loads the variable fname (or
    > > > _root.fname) is listed as 'undefined'.
    > > >
    > > > I'm trying to use the variable in code like this:
    > > >
    > > > _root.message = "Dear "+_root.fname+" below is your name hieroglyphs."
    >
    > The html page Heiro.html is not passing your variable to your Flash movie.
    > To do that, you need to use an ASP, PHP, Perl or whatever page to take the
    > variable from the URL and insert it into the <embed> or <object> tag you use
    > to load the Flash movie. It's extremely simple but it does have to be an
    > 'active' page, not just html.
    >
    > Look up Flashvars in google for more, although how you create your new
    > Heiro.[asp|pl|blah] page is up to you and your server; ask here for more.
    >
    > hth
    >
    > h
    Tom Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139