[SWFObject] loading Vars in the source tag.

dayvid jones dayvid at dayvid.com
Tue Apr 25 16:35:17 PDT 2006


Hi Geoff, thanks so much for creating SWFObject, you've really help  
out a lot of people.

I have a question.  Using SWFObject, can I still load vars in the swf  
string?

So if I have a .swf string like this:
movie.swf?variable1=value1&variable2=value2&variable3=value3

Do I have to write it like this:

<script type="text/javascript">
    var so = new SWFObject("movie.swf", "mymovie", "200", "100", "7",  
"#336699");
    so.addVariable("variable1", "value1");
    so.addVariable("variable2", "value2");
    so.addVariable("variable3", "value3");
    so.write("flashcontent");
</script>



Or can I write it like this too:

<script type="text/javascript">
    var so = new SWFObject("movie.swf? 
variable1=value1&variable2=value2&variable3=value3", "mymovie",  
"200", "100", "7", "#336699");
    so.write("flashcontent");
</script>


I've tried it the second way and it appears to be working, but I just  
want to make sure.  I'm going to be replacing a lot of embed/object  
tags in the next couple of weeks and I want to make sure I'm doing it  
correctly.

Thanks again.

___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___

D A Y V I D     J O N E S

Free Games, Free Music, Cool Photos and Documentaries!
http://www.dayvid.com

...shouldn't you be listening to Calico Radio?
http://www.CalicoRadio.com

music for the mAdNeSs!
http://www.DJGecko.com







More information about the Swfobject mailing list