[SWFObject] loading Vars in the source tag.

dayvid jones dayvid at dayvid.com
Tue Apr 25 21:21:52 PDT 2006


Thanks Geoff, I have soooooooo many pages to recode and many of them  
load vars in the swf path.   You bring up a very good point, but to  
save time, I'll just keep loading the vars in the .swf path, most of  
the content never changes.

You can check out the all flash and all kids site at:  
www.sparktop.org, there's fun games and stuff ; )

Thanks again.




On Apr 25, 2006, at 7:55 PM, Geoff Stearns wrote:

> yes, you can do it that way if you like, but i recommend doing it
> using the addVariable.
>
> addVariable uses FlashVars, which means it won't affect the caching
> of your swf, and there is no restriction on the length of vars you
> can pass into the swf (or at least it makes the limit *much* higher
> than the browser limit.
>
> if those vars change at all, every time they change, the browser will
> make a new request to your server, negating speed increase your users
> might get from caching of the swf file.
>
>
>
> On Apr 25, 2006, at 7:35 PM, dayvid jones wrote:
>
>> 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
>>
>>
>>
>>
>> _______________________________________________
>> SWFObject mailing list
>> SWFObject at lists.deconcept.com
>> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com

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

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