The trick is to use simple JavaScript to resize the Flash DOM node:
function resizeFlash( h ) { // "flash-node-id" is the ID of the embedded Flash movie document.getElementById("flash-node-id").style.height = h + "px"; }
What do you call from the Flash movie as follows:
ExternalInterface.call("resizeFlash", 400);
In fact, you don’t need to have JavaScript code from the outside, you can do all this from Flash if you want:
ExternalInterface.call( "function( id, h ) { document.getElementById(id).style.height = h + 'px'; }", ExternalInterface.objectID, 400 );
An anonymous function is to simply pass identifiers and heights as parameters, rather than concatenating them into a JavaScript string.
I think JavaScript is pretty cross-platform. If you want to see a live example, look at this site: talkoftheweather.com . It may not look like it was doing anything, but it automatically resizes the Flash movie to accommodate all the news (this happens immediately after downloading the news, which is done so quickly that you did not notice that this is happening) . Resizing causes the browser to show a vertical scroll bar.
source share