[SWFObject] FO Integration Kit problems

Geoff Stearns geoff at deconcept.com
Tue May 9 07:03:24 PDT 2006


well that's interesting... i wonder if the js is executing so fast it  
gets the same lcid?

that should be pretty easy to fix... you could just add a random  
number to the end of it, and you'd probably never have collisions.

var lcId3 = new Date().getTime() + Math.round(Math.random()*100000);



On May 9, 2006, at 9:40 AM, Keith Takayesu wrote:

> Geoff-
>
> I did some experiments by going back to the old (2005/06/16)  
> version of FlashJS, and got it working with my SWF. By doing so, I  
> found a weird problem that seemed to be the one I was having. All  
> of my lcIDs ended up the same! Even under Firefox, too.
>
> The code was doing this:
>
> var lcId1 = new Date().getTime();
> var flashProxy = new FlashProxy(lcId1, "/swf/ 
> JavaScriptFlashGateway.swf");
> var lcId2 = new Date().getTime();
> var flashProxy2 = new FlashProxy(lcId2, "/swf/ 
> JavaScriptFlashGateway.swf");
> var lcId3 = new Date().getTime();
> var flashProxy3 = new FlashProxy(lcId3, "/swf/ 
> JavaScriptFlashGateway.swf");
>
> The only way I could fix it was by adding a unique number to the  
> end of each lcId, like:
>
> var lcId1 = new Date().getTime();
> var flashProxy = new FlashProxy(lcId1, "/swf/ 
> JavaScriptFlashGateway.swf");
> var lcId2 = new Date().getTime()+1;
> var flashProxy2 = new FlashProxy(lcId2, "/swf/ 
> JavaScriptFlashGateway.swf");
> var lcId3 = new Date().getTime()+2;
> var flashProxy3 = new FlashProxy(lcId3, "/swf/ 
> JavaScriptFlashGateway.swf");
>
> Anyways, I'm not sure if this could have anything to do with the FO  
> Integration Kit problem, but perhaps it's a clue? Although I'm not  
> convinced that your class would end up with the same UID generated  
> each time.
>
> Later,
> Keith
>
>
> -----Original Message-----
> From: Geoff Stearns [mailto:geoff at deconcept.com]
> Sent: May 8, 2006 12:40 PM
> To: swfobject at lists.deconcept.com
> Subject: Re: [SWFObject] FO Integration Kit problems
>
>
> hey, some people on the osflash list were mentioning issues with this
> - they said in IE it was only sending calls once (or something along
> those lines)
>
> have you tested this in firefox too? do you get different results?
>
> i'm trying to set aside some time tonight to have a look and see
> where i broke it - it's possible i just broke it when i did the
> rename from flashobject to swfobject...
>
>
>
> On May 8, 2006, at 10:51 AM, Keith Takayesu wrote:
>
>> Geoff -
>>
>> Thanks for the tip about local testing, however, it didn't make a
>> difference to my test.
>>
>> As for my Flash movie, I suspect that their might be some  
>> interference
>> with other classes that perform LocalConnection, such as Log (to
>> FlashInpector), NetDebug, or Xray. I will perform some experiments
>> with
>> this. I also am using the ARP framework with Flash Remoting calls.
>>
>> But here is the simple code that I am running from the root of my  
>> SWF,
>> unforunately our app is internal, so I cannot post an external sample
>> ...
>>
>>
>> import com.macromedia.javascript.JavaScriptProxy;
>> import org.osflash.arp.log.Log;
>>
>> var proxy:JavaScriptProxy = new JavaScriptProxy(_root.lcId,this); var
>> statusText:String = "lcId=" + _root.lcId; trace (statusText);
>> Log.error(statusText); // Log is initialized in the Application
>> function addItem(item:Object):Void {
>> 	Log.error("Application:addItem:");
>> 	Log.error(item);
>> }	// addItem
>> function displayData(d) {
>> 	Log.error("Application:displayData:");
>> 	var myText = "Application:displayData:" + typeof(d) +" : "+
>> d.toString();
>> 	Log.error(myText);
>>
>> Essentially, the "displayData" seems to run only once (when going via
>> browser), then give me the JavaScript errors on subsequent calls.  
>> When
>> running local, it does not run at all, yet gives me no errors. On the
>> same page, I also load the sample js_integration_display.swf, and it
>> works just fine.
>>
>> In another part of the code (inside a clip), I perform this when a
>> button is pressed:
>> 		_root.proxy.call("doAlert");
>>
>> This works fine, everytime.
>>
>> So I think that something inside my SWF seems to be clobbering the
>> FlashProxy, or is somehow clobbering the SWF-to-SWF communications
>> after
>> we run FlashProxy at least once.
>>
>> I am going to start adding some things to the sample to see if I can
>> duplicate the problem. BTW, has anyone know if I can put all the  
>> proxy
>> initialization code inside a class, or does it have to be in the root
>> (like all the examples I see)?
>>
>> Thanks,
>> Keith
>>
>>
>> Geoff wrote...
>>
>>> hmm... well for local testing, you'll need to add a param:
>>>
>>> fo.addParam("allowscriptaccess", "always");
>>>
>>> and that should get it working...
>>>
>>> for the server issue - if it only executes once, it usually means
>>> that the callback from the flash movie is not being sent out, which
>>> makes me think that there may be errors there somewhere.
>>>
>>> did you create the flashproxy and include the .as classes in your
>>> fla? do you get any errors when you publish it?
>>>
>>> if you could post a link to a test page that might help out a bit as
>>
>>> well.
>>
>> On May 5, 2006, at 4:11 PM, Keith Takayesu wrote:
>>
>>> I have a problem with the integration so far in my ARP application.
>>> For testing, I have put the initialization in the root script, like
>>> in
>>> all
>>> the FlashJS demos. Sending out to JavaScript works fine. However,
>>> when I
>>> try to invoke a function inside of the module from JavaScript, I  
>>> get:
>>>
>>> "Line: 252
>>> Char: 5
>>> Error: 'FlashProxy' is undefined"
>> ===================================================================== 
>> =
>> ==============
>>
>> La version française suit le texte anglais.
>>
>> --------------------------------------------------------------------- 
>> -
>> --------------
>>
>> This email may contain privileged and/or confidential information,
>> and the Bank of
>> Canada does not waive any related rights. Any distribution, use, or
>> copying of this
>> email or the information it contains by other than the intended
>> recipient is
>> unauthorized. If you received this email in error please delete it
>> immediately from
>> your system and notify the sender promptly by email that you have
>> done so.
>>
>> --------------------------------------------------------------------- 
>> -
>> --------------
>>
>> Le présent courriel peut contenir de l'information privilégiée ou
>> confidentielle.
>> La Banque du Canada ne renonce pas aux droits qui s'y rapportent.
>> Toute diffusion,
>> utilisation ou copie de ce courriel ou des renseignements qu'il
>> contient par une
>> personne autre que le ou les destinataires désignés est interdite
>> Si vous recevez
>> ce courriel par erreur, veuillez le supprimer immédiatement et
>> envoyer sans délai à
>> l'expéditeur un message électronique pour l'aviser que vous avez
>> éliminé de votre
>> ordinateur toute copie du courriel reçu.
>> _______________________________________________
>> SWFObject mailing list
>> SWFObject at lists.deconcept.com
>> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>
> ====================================================================== 
> ==============
>
> La version française suit le texte anglais.
>
> ---------------------------------------------------------------------- 
> --------------
>
> This email may contain privileged and/or confidential information,  
> and the Bank of
> Canada does not waive any related rights. Any distribution, use, or  
> copying of this
> email or the information it contains by other than the intended  
> recipient is
> unauthorized. If you received this email in error please delete it  
> immediately from
> your system and notify the sender promptly by email that you have  
> done so.
>
> ---------------------------------------------------------------------- 
> --------------
>
> Le présent courriel peut contenir de l'information privilégiée ou  
> confidentielle.
> La Banque du Canada ne renonce pas aux droits qui s'y rapportent.  
> Toute diffusion,
> utilisation ou copie de ce courriel ou des renseignements qu'il  
> contient par une
> personne autre que le ou les destinataires désignés est interdite.  
> Si vous recevez
> ce courriel par erreur, veuillez le supprimer immédiatement et  
> envoyer sans délai à
> l'expéditeur un message électronique pour l'aviser que vous avez  
> éliminé de votre
> ordinateur toute copie du courriel reçu.
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com




More information about the Swfobject mailing list