If you're using swfobject, as I believe they have a
getQueryParamValue("variable1") method.

var so = new SWFObject("movie.swf", "mymovie", "400", "200", "8", "#336699");
   so.addVariable("variable1", getQueryParamValue("variable1"));
   so.addVariable("variable2", getQueryParamValue("variable2"));
   so.write("flashcontent");


If not there is a way to get the URL from JavaScript, by parsing out
the variables in window.location.href.

Copying random code found in google, but here's *a* solution.

function gup( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}




On Mon, Aug 25, 2008 at 9:30 AM, Mendelsohn, Michael
<[EMAIL PROTECTED]> wrote:
> Yes, html only.   :-(
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Steve
> Bailey
> Sent: Monday, August 25, 2008 10:18 AM
> To: Flash Coders List
> Subject: Re: [Flashcoders] Passing params via url instead of FlashVars
>
> Are you restricted to using HTML?  Could you use something like PHP?  If
> you could, it'd be quite trivial.
>
> Steve
>
>  -------------- Original message ----------------------
> From: "Mendelsohn, Michael" <[EMAIL PROTECTED]>
>> Hi list...
>>
>> Anyone have a recommendation for passing params into a swf via the url
> instead
>> of FlashVars?
>>
>> I need to send out an email link like so:
>>
>> Clickhere.html?a=1
>> Clickhere.html?a=2
>>
>> Would it be easier to just send links to two different html pages,
> each with
>> different Flash Vars?  The idea I had was to simply have one swf.
>>
>> Thanks,
>> - Michael M.
>>
>>
>>
>>
>> _______________________________________________
>> Flashcoders mailing list
>> [email protected]
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
Jer
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to