This content has been marked as final.
Show 11 replies
-
1. Re: change size of index.html dynamically?
.:}x-=V!P=-x{:. Jan 31, 2007 11:54 AM (in response to luciewong)yes have Flash call a Javascript function to resize window. -
2. Re: change size of index.html dynamically?
kglad Jan 31, 2007 12:48 PM (in response to luciewong)you can change the size of the browser window but you can't change the flash stage dimensions. you'll need a work-around (use a mask, for example) to make it appear the stage dimensions have changed. -
3. Re: change size of index.html dynamically?
.:}x-=V!P=-x{:. Jan 31, 2007 3:40 PM (in response to luciewong)actually you can change the flash stage dimensions but however i cannot reveal my method -
4. Re: change size of index.html dynamically?
kglad Jan 31, 2007 6:55 PM (in response to luciewong)and i have a sure fire method to generate unlimited amounts of money legally in little time and with no effort, but this quick reply box is too small to contain the information. -
5. Re: change size of index.html dynamically?
luciewong Jan 31, 2007 7:59 PM (in response to kglad)Thank you Kglad and “.:}x-=V!P=-x{:.” for your reply.
When data is loaded, I change the background color with the code below:
//xxxxchange BG color>>
nwebBGColor = TwebBG;
code1 = "JavaScript:changeBgColor(";
code2 = nwebBGColor;
code3 = ")";
UrlCode = (code1 + code2 + code3);
getURL(UrlCode);
//xxxxx
//xxxxxxhtml>
<script language="JavaScript">
<!--
function changeBgColor(newBgColor) {
if (window.document && window.document.bgColor) {
document.bgColor = newBgColor;
}
}
// -->
</script>
//xxxxxxxxxxxxxxx
Could I build in this code also the function to change the height?
And how should this look like?
“.:}x-=V!P=-x{:.” if you could give me a hint, really appreciate it.
Thanks
Hi Kglad,
the Browser opens first with a height of 1300 and when my data is in, Flash knows, the height should be actually 2500. It should then change the browser’s height regarding its content to 2500.
When I make a mask or an emptyMovieClip, still I think I must send some JavaScript to change the browser?
About money sounds interesting, can you give me some info?
newbrainstorm@hotmail.com
Thank you.
Best regards,
Lucie
By the way, I’ve found out, that all my websites have this “click to activate” - Frame around again. Does the previous Update-code from MM not work anymore with the latest Microsoft Browser version?
Bye
-
6. change size of index.html dynamically?
.:}x-=V!P=-x{:. Feb 1, 2007 9:24 AM (in response to kglad)kglad - touché lol -
7. Re: change size of index.html dynamically?
sergiourra Feb 1, 2007 10:14 AM (in response to luciewong)Why not using stage resize? -
8. Re: change size of index.html dynamically?
luciewong Feb 2, 2007 10:04 AM (in response to sergiourra)Sorry guys,
but still no clou how I should do this.
stage.resize does not work<thank you anyway.
regards
Luciewong -
9. Re: change size of index.html dynamically?
motionman95 Jul 16, 2007 1:14 AM (in response to luciewong)HaHa! I found it:
Stage size control with ActionScript
This sample demonstrates how the Stage.scaleMode property affects the values of Stage.width and Stage.height when the browser window is resized.
You can find the sample source file, stagesize.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript\StageSize.
On the Macintosh, browse to Macintosh HD/Applications/Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript/StageSize. -
10. Re: change size of index.html dynamically?
Gorka Ludlow Jul 16, 2007 7:43 AM (in response to luciewong)How about this:
instead of changing the stage's dimensions you use a huge stage with the noscale option selected and then whenever you change the browser's size all you need to do is relocate the movieclips in your movie to the correct position.
Cheers,
Gorka
www.AquiGorka.com -
11. Re: change size of index.html dynamically?
luciewong Jul 16, 2007 9:31 AM (in response to Gorka Ludlow)Hi guys,
thanks for your replies to my post.
In the meantime I have solved the problem.
this.cHeight_btn.onPress = function(){
var nHeight:Number = 3500;
_level0.getURL("javascript:resizeSWF("+nHeight+");");
};
And in my Html index I call the function:>
<!--
function resizeSWF(nHeight) {
nHeight += "px";
//document.getElementById("resizer").style.height = nHeight;
document.getElementById("index_Admin").style.height = nHeight;
if (window.document && window.document.height) {
window.document.height = nHeight;
}
}
//-->
Now I change my Browser height with a button click from my Flash SWF file, that's what I wanted.
Thanks for your interest.
Luciewong