[Flashjs] Size limit in amount of data sent to JS?

Al Deluca alfred_deluca at harvard.edu
Fri Sep 21 14:44:43 PDT 2007


Hello,

I'm developing a printing solution in Flash and coming up against what I 
believe to be a size limit in the amount of data that can be fed from a 
Flash movie to a JS function, but only in IE 6.0 (it works wonderfully in 
FF),on Win XP SP2. Wondering if anyone else has seen this. I did look over 
the archives of this list and didn't find anything about it in relation to 
the most recent version of the integration kit, and Google has given me 
some conflicting and outdated information regarding size limits. At least 
one resource has told me that there is no known size limit to data moved 
from Flash to a JavaScript function... Should I believe that? I have found 
that if I pass over a smaillish amount of text it does indeed work 
perfectly. If I exceed that smallish amount by a few characters, it breaks; 
it's as if the JS function is never called. Here is some code which shows 
the amount of text that breaks it:

**from the movie/'s actionscript panel:** :

import com.macromedia.javascript.JavaScriptProxy;
var proxy:JavaScriptProxy = new JavaScriptProxy(_root.lcId, this);

this.attachMovie("holder_mc", "holder_mc_in", 2);

pagination_str="here is some text. here is some text here is some text. 
here is some text. here is some text. here is some text. here is some text. 
here is some text. here is some text. here is some text.here is some text.. 
here is some text.here is some text.. here is some text.here is some text.. 
here is some text.here is some text."; // this seems absurdly small (and 
delimiter free) to break FSCommand... could be a parsing problem or the 
.htmlText

_root.holder_mc_in.tf_in.htmlText = pagination_str;

this.print_bttn_in.onRelease = function() {
	transferItemToJavaScript();
}

function transferItemToJavaScript():Void {
     proxy.call("printFlash", _root.holder_mc_in.tf_in.htmlText);
}

** from the hosting HTML page** :

<script type="text/javascript" src="js/JavaScriptFlashGateway.js"></script>
<script type="text/javascript" >
<!--
var uid = new Date().getTime();
var flashProxy = new FlashProxy(uid, "gateway/JavaScriptFlashGateway.swf" );

function printFlash(str){
	//alert("here i am " + str )
	alert("just confirm that the function has been called") // print button 
does nothing if text > ~ 250 characters
}
//-->
</script>

If anyone could offer some insight, I would greatly appreciate it.

Thanks.

oh, and I know what RTFM means, though I sometimes don't know which M to F 
R. Is there more in-depth documentation available?

----

Al DeLuca
Manager, Multimedia Development
Educational Systems and Technology
Harvard University
alfred_deluca at harvard.edu






More information about the Flashjs mailing list