Hi Robson.
Thanks for the answer.
I´ve tryed your solution but it still not working.
Can you send me a little exemple in a zip file ? With gadget XML ?
Thanks
Daniel
On 5 nov, 03:19, "Robson Dantas" <[EMAIL PROTECTED]> wrote:
> Hi Daniel.
>
> I've fought hard with flash to make it work and fortunately I did.
>
> 1) You should use adobe flash >= 8.0 ;
> 2) You must configure the swf file to use actionscript 2.0 (file->publish
> settings)
> 3) You must setup security policies in the main module. That makes the
> browser accept javascript calls and also allow browser to call actionscript
> functions.
>
> import flash.external.*;
> import flash.system.Security;
>
> Security.allowDomain('*');
>
> 4) Use this javascript function to get a flash instance (dont use
> document.getElementById directly)
>
> function getSWF(movieName) {
> if (navigator.appName.indexOf("Microsoft") != -1) {
> return window[movieName];
> }
> else {
> if(document[movieName].length != undefined){
> return document[movieName][1];
> }
> return document[movieName];
> }
>
> }
>
> 5) Use swfobject to avoid crossbrowsers
> issues.http://blog.deconcept.com/swfobject/
>
> 6) Call a jsfunction from flash, use:
> var ret = ExternalInterface.call("somefunction");
>
> If your function returns string, then ret will be string; if it returns
> integer, will be int, and so on...
>
> Call an actionscript function from jscript:
>
> getSWF("someid").somefunction();
>
> That's it! Hope it helps.
>
> Cheers,
>
> --Robson
>
> 2008/11/2 Daniel <[EMAIL PROTECTED]>
>
>
>
> > Hi!
>
> > I'm trying to use flash in the opensocial application that I'm working
> > on, I´ve use the example from this website:
> >http://hackathon.wordpress.com/2008/02/26/update-flex-and-open-social/
>
> > But I´ve receive an error....
>
> >http://www.orkut.gmodules.com/gadgets/proxy?refresh=3600&gadget=http%...
> > de ExternalInterface não pode acessar
>
> >http://fq9nfd26d2itu8n5jkvlvc2o594d08b7.prod.sandbox.orkut.gmodules.c...
> > .
> > at flash.external::ExternalInterface$/_initJS()
> > at flash.external::ExternalInterface$/addCallback()
> > at bridge::FABridge/initializeCallbacks()
> > at bridge::FABridge()
> > at osx/_osx_FABridge1_i()
> > at osx()
> > at _osx_mx_managers_SystemManager/create()
> > at mx.managers::SystemManager/initializeTopLevelWindow()
> > at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/
> > internal::docFrameHandler()
>
> > Does anyone know why this happens?
>
> > Does anyone can send me an example application in a zip file ?
>
> > Thanks
>
> > Daniel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"OpenSocial Application Development" 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-api?hl=en
-~----------~----~----~----~------~----~------~--~---