I'm trying to use SWFObject version 2.1 to load multiple swf files
into a <DIV> tag via hyperlinks on the page when the SWF files loaded
will have different heights and widths.These SWF movies are not
produced by me, so I cannot edit the ActionScript in them.

Can I pass the width and height as URL parameters - as I can do with
the src filename?

This is the basic code:
<a href="/lab/_common/sample.swf" onclick="loadSWF(this.href,
'flashcontent'); return false;">Click here to load a sample SWF</a>

<a href="movie2.swf?width=300&height=300" onclick="loadSWF(this.href,
'flashcontent'); return false;">Click here to load a sample SWF</a>
<a href="movie3.swf?width=600&height=400" onclick="loadSWF(this.href,
'flashcontent'); return false;">Click here to load a sample SWF</a>

I'm trying to add in url parameters for the width and height for each
hyperlinks that loads a SWF movie. The swf filename is passed just
fine as data:url, but my experimentation with width and height has not
worked so far.

Here's the sample of the SWFObject code I believe is relevant:

<script type="text/javascript">
function loadSWF(url, targetID){
        //Check for existing SWF
        if(isObject(targetID)){
                //replace object/element with a new div
                replaceSwfWithEmptyDiv(targetID);
        }
        //Embed SWF
        if (swfobject.hasFlashPlayerVersion("7")) {
                var attributes = { data: url, width:"550", height:"400" };
                var params = {};
                var obj = swfobject.createSWF(attributes, params, targetID);
        }

Thx!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to