Problems using '&' when sending mutliple flashvars

Posted on 2005-04-27
Last Modified: 2008-01-09
I'm trying to send a few vars to my .swf via flashvars. My page is xhtml, whihc is why I assume it's ignore all vars after the first ampersand, Here is the relevant line of code


In both cases only the first var is passed, any ideas??

Question by:civic86
    LVL 27

    Expert Comment

    There should be no problem with that, but try to reverse it:

    LVL 16

    Expert Comment

    It seems to me that by defining it as flashvars="blah blah" your defining the whole string as one variable.

    Try this:
    <param name=FlashVars value="id=22&lang=main.php?category=Net IT">


    Author Comment

    hmm, not too much luck, but maybe there is a misunderstanding.
    I only want flash to receive one variable. The var name is lang, and I would like its value to be


    Thanks in advance.

    Author Comment

    Could this be because I am using xhtml? Doesn't it have issues with using ampersand or something? I have tried with &amp; but to no avail.
    LVL 27

    Accepted Solution

    >I only want flash to receive one variable

    Ah, ok, then you cannot use "&", because flash uses it as a variables separator. In this case, you should url encode your ampersand:


    Author Comment

    Thanks very, very much

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
    Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
    In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
    This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now