Question

I need to make my application height dynamic based on the size of a data grid which changes after a user does a search for specific items. Can someone help me with this.

Also when im embedding in my html is there a javascript function i can call which can access applicatin height so i can set page accordingly?

the javascript needs to be called from inside my html page so that i can get the dynamaic height

Was it helpful?

Solution

If your SWF embedding object has an ID (or any other means of unique identification, for that matter), then it is rather simple to change its size. Using jQuery, for example:

$("#swf").height(500);

This sets the height of the SWF to 500 pixels. It is fairly simple even without jQuery:

document.getElementById("swf").style.height = "500px";

To call javascript from inside Flash, use the ExternalInterface class, it has a static method for this purpose. (Alternatively, you may use the navigateToURL() static function with "javascript:" protocol.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top