Not signed in (Sign In)

Vanilla 1.0.3 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthordClarke
    • CommentTimeMay 6th 2007
     
    Hi, I hope I can find a solution in here...

    The thing is like that: I have a flash file with clickTag inside.
    (the FLA has clickTag inside).

    In the HTML code I write something like that:

    var flash = new FlashObject("flashfile.swf", "movie", "515", "357", "6", "");
    flash.addVariable("clickTag", "http://www.mysite.com?id=1234&cat=5678");
    flash.addParam("quality", "best");
    flash.write("flashImage2");

    The problem is that when clicking on this flash, it goes to the following:
    http://www.mysite.com?id=1234 ignoring the other parameters with "&"

    This applies also when I use <object> tags, like the following:

    <param name="movie" src="flashfile.swf?clickTag=http://www.mysite.com?id=1234&cat=5678">

    It goes only to http://www.mysite.com?id=1234 , cutting the rest.

    Any clue...?

    Thanks for your help

    Clarke
    • CommentAuthorphilip
    • CommentTimeMay 6th 2007
     
    the ampersand (&) might be causing the problem... it may be interpreted as an HTML entity. try using the equivalent &
    as follows:

    http://www.mysite.com?id=1234&cat=5678

    I know in XHTML, if you use a straight ampersand (&) instead of its HTML equivalent (&), your page will fail "XHTML 1.0 transitional" validation.

    - philip
    • CommentAuthorphilip
    • CommentTimeMay 6th 2007
     
    ugh the comments box converted my code!

    i meant use:

    & amp ;

    without the spaces. an ampersand (&) immediately followed by the text: amp;

    see this article: http://htmlhelp.com/tools/validator/problems.html#amp

    - philip
    • CommentAuthorAran
    • CommentTimeMay 6th 2007
     
    Clarke.

    If you don't want to manually convert the characters , use the escape() / unescape() functions available in both javascript and actionscript - you can have a look at this solution I posted ealier:

    http://blog.deconcept.com/swfobject/forum/discussion/299/


    Cheers,
    Aran
    • CommentAuthordClarke
    • CommentTimeMay 6th 2007
     
    Hi,

    You know, I've been looking for a solution to this for a long time, posted lots of Macromedia forums but no use, and
    somehow, when I got here I had a feeling I'll find a solution in here, and there it is ;)

    The 'escape' seems to work perfectly! Thanks very much for your time...

    Just one question then... this refers when using the flashObject, now what can be done when using
    a plain <OBJECT> tag?
    like this <param name="movie" src="flashfile.swf?clickTag=http://www.mysite.com?id=1234&cat=5678">

    Again, thanks very much!
    • CommentAuthorphilip
    • CommentTimeMay 7th 2007 edited
     
    you can either manually type the alternate (& amp;) or you can use javascript to write the entire line (using document.write). creating the entire line with javascript will give you the chance to use the escape() function.

    you could also use PHP (or ASP) to write the variables as follows:

    <param name="movie" src="flashfile.swf?clickTag=http://www.mysite.com?id=<?php echo id ?>& amp;cat=<?php echo cat ?>">