Over the years I’ve been asked “what’s the limit on the length of string we can send into your SWF? And how slow is Flash at handling that little chunk of data?”.. and it’s usually so infrequently that I forget from one time to the next (hmm.. memory loss.. I’m getting old!) So I sat down last night and searched around and gathered up what I could find.. and put together a page with examples. So here it is.. the next time somebody asks me how fast I can send 2Mb of data into a SWF from JavaScript I’ll know the answer… I hope..
Sending big strings into Flash Friday, February 17, 2006
Have Your Saycomments & trackbacks
The trackback URL for this entry is: http://oddhammer.com/index.php/trackback/171/7mrbxTTX/
19 Feb 2006 at 05:38 am | #
Flash to JavaScript
What about passing large strings from Flash to JavaScript? I've found that I've needed to adopt a similar approach to plan c but when going from Flash to JS in IE at least if you try and send the data in a loop not all of the data gets through. I resorted to using an interval to give the JS time to breath. Has anyone else got a better suggestion?
ResponseMX
re:rmx blog
19 Feb 2006 at 10:56 am | #
oh.. yeah.. sorry.. use plan c with a callback.. so when you have a big string you need to send OUT to IE via JS call a JS function that tells the JS "I'm ready to send out a big string".. ten JS can use getVariable to retrieve the string(s). If the sting is so big that you need to split it up then do that in the SWF before you make the call out.. have the strings ready, call out, and then JS can iterate through getting each of the strings at it's own pace..
19 Feb 2006 at 11:42 am | #
I'll give it a try - never thought of using getVariable - I've been pushing with getURL("[removed]foo(data)");
Thanks,
Matt.