[SWFObject] FO Integration Kit problems

Keith Takayesu ktakayesu at bank-banque-canada.ca
Mon May 8 07:51:51 PDT 2006


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"
>
-------------- next part --------------
====================================================================================

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.


More information about the Swfobject mailing list