RE: #1 - SWFObject does require a width / height value, but it can be a fixed or percentage value. You can control the size / position through a wrapper <div> + CSS. It all depends on how you want to layout your page. If you want the swf to always encompass 100% of the available w/h of the browser, then check out FAQ #1 and the examples:
http://code.google.com/p/swfobject/wiki/faq RE: #2 - SWFObject will replace the contents of the alternate content <div> target you specify. If all of your links etc are in the <div>, then they will get replaced when the swf is written to the page. Does that make sense? Aran On Tue, May 26, 2009 at 11:42 AM, <[email protected]> wrote: > > Thanks VERY much for your kind help. Here's my progress in chipping > away at this problem... > yes, the page works locally on my own machine (with some > questions...see below), > and a standard (i.e. using html template automagically generated by > Flex in this case) embed works on my password protected server > environment, and when I remove the password on the server and use > this SWFObject stuff, the .swf shows up very briefly and then I > immediately get kicked out to a page with a message saying Access > Forbidden. Maybe I need to talk to my hosting service about why that > might be. However, I DO have some questions about how it works > locally. > > 1) when I use the standard html template generated by Flex I don't > have to specify a width and height for my .swf. And that way it > scales and stretches appropriately with how the user sets the size of > their browser window. I see in the SWFObject doc that when you use > the .embedSWF method you MUST provide the width and height....so how > do I make my stuff scale/re-layout (using standard Flex app > capabilities) properly and not have it truncated? > 2) I would like my launching of the .swf to actually launch in such a > way that it is the only thing you see (not my links)...so how do I get > it to wipe those out/or overlay with a new page? Am I saying that > right? > > Thanks very much in advance for any help you can provide. > > On May 25, 5:16 pm, Aran Rhee <[email protected]> wrote: > > Hi Anne. > > > > In these sort of cases, I always try to reduce the problem to its > smallest > > parts. It does not seem as if SWFObject has anything to do with this > > particular issue to me, and is more to do with your particular server > setup. > > The sort of things I would test would be: > > > > Does the page work locally on your own machine? > > Does the page work in a non-password protected environment? > > Does a standard embed from Flash work in your password protected > > environment? > > > > Cheers, > > Aran > > > > > > > > On Tue, May 26, 2009 at 9:23 AM, annespg <[email protected]> > wrote: > > > > > Please be gentle and try to spell out answers in detail as I'm a > > > newbie who knows very little about Javascript and ins and outs of web > > > publishing stuff in general. I've always just published my SWFs > > > (sometimes built using Flash, sometimes built using Flex) using the > > > html template code that those tools generate. I am now trying to use > > > SWFObject and flashvars for the first time. I have created the html > > > below to launch a .swf. I named this testindex.html and have it in a > > > directory on my site which I have password protected. As soon as I > > > click on either of the links, I get the javascript popup that shows I > > > passed the correct data to establish my flashvars, but then instead of > > > seeing my .swf load, I get a 403 Access Forbidden message. What am I > > > doing wrong? Why doesn't this work? > > > > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// > > >www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > > > <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> > > > <head> > > > <title>physioSim Interactive Textbook Demo</title> > > > <meta http-equiv="Content-Type" content="text/html; > > > charset=iso-8859-1" /> > > > <script type="text/javascript" > src="swfobject.js"></script> > > > <script type="text/javascript"> > > > function loadSWF(welcome_xml){ > > > var flashvars = {}; > > > flashvars.welcomeURL = welcome_xml; > > > alert("loadSWF called with > > > "+flashvars.welcomeURL); > > > var params = {}; > > > var attributes = {}; > > > swfobject.embedSWF("PhysioBookLoader.swf", > > > "myAlternativeContent", "973", "500", "9.0.0", false, flashvars, > > > params, attributes); > > > > > } > > > </script> > > > </head> > > > <body> > > > <p><a href="" onclick="loadSWF('xml/welcomes/ > > > vitalsWelcome.xml')">Load Vitals Book</a></p> > > > <p><a href="" onclick="loadSWF('xml/welcomes/ > > > vitalsWelcomeAbr.xml')">Load Vitals Book Abridged</a></p> > > > <div id="myAlternativeContent"> > > > <p> If you want to use the physioSim Interactive > > > Textbook, you need > > > Flash!</p> > > > <p><a href=" > http://www.adobe.com/go/getflashplayer > > > "> > > > <img src=" > > >http://www.adobe.com/images/shared/download_buttons/ > > > get_flash_player.gif" alt="Get Adobe Flash player" /> > > > </a> > > > </div> > > > </body> > > > </html>- Hide quoted text - > > > > - Show quoted text - > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
