I am creating a site in flash that is reading in entries from a database. I want the swf to expand downward on the html page so the user can use the browser scroll bars to see all the content. I don't want to paginate everything into a 800 px high swf or something - I want the page to expand just like it would if it were html. Possible?
+4
A:
We do exactly that in a private project. We have a function that uses ExternalInterface.call (http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html):
if (ExternalInterface.available) ExternalInterface.call('resizeScene', newHeight)
to call a javascript function which simply resizes the div element:
function resizeScene(newHeight)
{
document.getElementById('website').style.height = parseFloat(newHeight) + 'px';
}
You may also want to investigate
http://livedocs.adobe.com/flex/3/langref/flash/display/Stage.html#align
and
http://livedocs.adobe.com/flex/3/langref/flash/display/Stage.html#scaleMode
Jotham
2009-11-10 02:02:53
Works great, thanks! I knew about ExternalInterface but didn't know the flash would expand automatically.
phil
2009-11-10 20:22:43