Try this:
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
  <ModulePrefs title="TestFlash" summary="..." description="..."
icon="..." thumbnail="..." author_email="..."
   author="..." screenshot="..." height="500">

    <Require feature="opensocial-0.7"/>
    <Require feature="flash" />
    <Require feature="dynamic-height"/>
    <Require feature="views" />
  </ModulePrefs>

<Content type="html">
<![CDATA[
<script>document.write('<scr' + 'ipt src="' +
gadgets.io.getProxyUrl('http://...yourserver..../swfobject.js',
{ "REFRESH_INTERVAL": (60*60*24*365) }) + '"></scr' + 'ipt>'); </
script>

<div id="flashcontainer" style="height:500px"> </div>

<script type="text/javascript">
  function startGadget()
  {
    // url to swf, followed by a version number so you can update the
file
    var flashUrl = "http://yourserver.com/yourswf.swf?v=1.001";;

    // proxied version of swf - it will cache the swf on google's
servers for 365 days
    var movie = gadgets.io.getProxyUrl(flashUrl, { "REFRESH_INTERVAL":
(60*60*24*365) });

    var so = new SWFObject(movie, "myflash", "450", "500", "9",
"#ffffff");
    so.addParam("wmode", "transparent");
    so.addParam("allowScriptAccess", "always");
    so.addVariable("var1", "value1");
    so.addVariable("var2", "value2");
    so.write("flashcontainer");

    gadgets.window.adjustHeight();
  }

  gadgets.util.registerOnLoadHandler(startGadget);
</script>

]]>
</Content>
</Module>



On Jul 8, 5:31 am, isolated <[EMAIL PROTECTED]> wrote:
> Thanks a lot for your Reply Dave
> I have problem with 2nd Answer, I couldnt understand it.
> Please explain this getProxyUrl in detail. Any example code or
> documentation regarding it?
> Thanks again
>
> On Jul 8, 11:03 am, davew <[EMAIL PROTECTED]> wrote:
>
> > A1: Yes you can add Flash to a OpenSocial application, and have it
> > load data or assets from an external server.  You can either use the
> > js makeRequest (via the actionscript ExternalInterface) or you can use
> > a crossdomain.xml to talk directly to your server.  You do not need to
> > bundle all resources in to your swf.  You can load them as needed.
> > Just keep in mind things like Cache-Control on files and using
> > getProxyUrl to reduce the hit on your server.
>
> > A2. I've found using a combination of SWFObject + getProxyUrl works
> > well.  You can use getProxyUrl to get a proxied url to your swf file.
> > Then pass the proxied url to SWFObject, along with your allowscript,
> > etc, flags.
>
> > On Jul 7, 11:35 am, isolated <[EMAIL PROTECTED]> wrote:
>
> > > Hello All
>
> > > Q:1
> > > Can i add a .swf file in the Application which loads data from an
> > > external server?
> > > I read in the documentation that all the resouces should be bundled in
> > > the .swf file.
>
> > > Q:2
> > > In ordinary html we can set many parameters for a .swf file, like
> > > autoplay, transparent window, even we can communite between browser
> > > and swf file using flash vars
> > > But i took a look at gadget programming's api reference and found
> > > nothing about setting these paraemeters for flash
> > > How can i add them?
>
> > > Thanks in advance
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" 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/opensocial-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to