A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: [RESOLVED] resizing a loaded swf

  1. #1
    Senior Member
    Join Date
    Jan 2007
    Location
    Barcelona
    Posts
    389

    resolved [RESOLVED] resizing a loaded swf

    Hi,

    I had asked about this long ago and looked around for a while but I am still confused with my results.

    A chat I'm working on is loading the background clip with the text input and two list components, a room and a userlist.

    I've placed this code in my main swf to try and resize the loaded movie but I doubt I am getting any result. When I test it I can see the chat input text field but once I post it and use html it's still way down below the screen.

    I'm creating a holder clip with createEmptyMovieClip and then loading the board in it from the main file. I am just not sure of where to place the code.

    Code:
    Stage.scaleMode = "exactFit";
    Stage.align = "TL";
    
    bHolder.board._width = Stage.width;
    bHolder.board._height = Stage.height;
    bHolder.board._x = 0;
    bHolder.board._y = 0;
    
    function StageResize() {
    	bHolder.board._width = Stage.width;
    	bHolder.board._height = Stage.height;
    	bHolder.board._x = 0;
    	bHolder.board._y = 0;
    }
    SizeListener = new Object();
    SizeListener.onResize = function() {
    	StageResize();
    };
    
    Stage.addListener(SizeListener);

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi Cap,

    Double check bHolder _x position too, if you get stuck attach a small example file.

    you might be better off using bHolder._x = 0 and bHolder._y = 0, then put the other movie clip position inside accordingly.

  3. #3
    Senior Member
    Join Date
    Jan 2007
    Location
    Barcelona
    Posts
    389
    Thanks, Fruit, I think it works properly. I just tried with a friend online but I don't think I make myself clear... Now that I've moved the chat input field to the loaded background board I thought it should show in any computer and I don't see it.

    I posted tthe files via oneDrive https://onedrive.live.com/redir?resi...hint=folder%2c

  4. #4
    Senior Member
    Join Date
    Jan 2007
    Location
    Barcelona
    Posts
    389
    it's an html issue then isn't it?

  5. #5
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi Cap,

    not sure if you have an html problem or not, if you do though then you need to add this paramater.

    <param name="allowFullScreen" value="true" />

    to both sets of params in the code.

    I don't have smartfox installed at present so cant help you with the previous files as it doesnt work without sfox

  6. #6
    Senior Member
    Join Date
    Jan 2007
    Location
    Barcelona
    Posts
    389
    Hi, Fruit,

    thanks for getting back,

    Will try that, but I only have one set of parameters in my html: it looks like this. Does it matter after what name I place it?

    Code:
    <HTML>
    <HEAD>
    <TITLE>index</TITLE>
    </HEAD>
    <BODY bgcolor="#ffffff" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">
    <!-- URL's used in the movie-->
    <!-- text used in the movie-->
    <!--
    <p align="center"></p>
    <p align="center"><font face="Verdana" size="10" color="#000000" letterSpacing="0.000000" kerning="0"><a href="http://www.gotoandplay.it" target = "_blank">2004 - powered by gotoAndPlay() &nbsp;- </a><font color="#990000"><a href="http://www.gotoandplay.it" target = "_blank"><b>www.gotoandplay.it</b></a></font></font></p>
    <p align="center"><font face="Verdana" size="10" color="#000000" letterSpacing="0.000000" kerning="0"><a href="http://www.gotoandplay.it" target = "_blank">2004 - powered by gotoAndPlay() &nbsp;- </a><font color="#990000"><a href="http://www.gotoandplay.it" target = "_blank"><b>www.gotoandplay.it</b></a></font></font></p>
    <p align="center"><font face="Verdana" size="10" color="#000000" letterSpacing="0.000000" kerning="0"><a href="http://www.gotoandplay.it" target = "_blank">2004 - powered by gotoAndPlay() &nbsp;- </a><font color="#990000"><a href="http://www.gotoandplay.it" target = "_blank"><b>www.gotoandplay.it</b></a></font></font></p>
    <p align="center"><font face="Verdana" size="10" color="#000000" letterSpacing="0.000000" kerning="0"><a href="http://www.gotoandplay.it" target = "_blank">2004 - powered by gotoAndPlay() &nbsp;- </a><font color="#990000"><a href="http://www.gotoandplay.it" target = "_blank"><b>www.gotoandplay.it</b></a></font></font></p>
    <p align="center"><font face="Verdana" size="10" color="#000000" letterSpacing="0.000000" kerning="0"><a href="http://www.gotoandplay.it" target = "_blank">2004 - powered by gotoAndPlay() &nbsp;- </a><font color="#990000"><a href="http://www.gotoandplay.it" target = "_blank"><b>www.gotoandplay.it</b></a></font></font></p>
    <p align="center"><font face="Verdana" size="10" color="#000000" letterSpacing="0.000000" kerning="0"><a href="http://www.gotoandplay.it" target = "_blank">2004 - powered by gotoAndPlay() &nbsp;- </a><font color="#990000"><a href="http://www.gotoandplay.it" target = "_blank"><b>www.gotoandplay.it</b></a></font></font></p>
    <p align="center"><font face="Verdana" size="10" color="#000000" letterSpacing="0.000000" kerning="0"><a href="http://www.gotoandplay.it" target = "_blank">2004 - powered by gotoAndPlay() &nbsp;- </a><font color="#990000"><a href="http://www.gotoandplay.it" target = "_blank"><b>www.gotoandplay.it</b></a></font></font></p>
    <p align="center"><font face="Verdana" size="10" color="#000000" letterSpacing="0.000000" kerning="0"><a href="http://www.gotoandplay.it" target = "_blank">2004 - powered by gotoAndPlay() &nbsp;- </a><font color="#990000"><a href="http://www.gotoandplay.it" target = "_blank"><b>www.gotoandplay.it</b></a></font></font></p>
    <p align="left"></p>
    <p align="center"><font face="_sans_10pt_st" size="10" color="#000000" letterSpacing="0.000000" kerning="1"><b>Guardar Historial delXat</b></font></p>
    <p align="center"><font face="Verdana" size="10" color="#000000" letterSpacing="0.000000" kerning="0"><a href="http://www.gotoandplay.it" target = "_blank">2004 - powered by gotoAndPlay() &nbsp;- </a><font color="#990000"><a href="http://www.gotoandplay.it" target = "_blank"><b>www.gotoandplay.it</b></a></font></font></p>
    <p align="center"><font face="Verdana" size="10" color="#000000" letterSpacing="0.000000" kerning="0"><a href="http://www.gotoandplay.it" target = "_blank">2004 - powered by gotoAndPlay() &nbsp;- </a><font color="#990000"><a href="http://www.gotoandplay.it" target = "_blank"><b>www.gotoandplay.it</b></a></font></font></p>
    <p align="center"><font face="Verdana" size="10" color="#000000" letterSpacing="0.000000" kerning="0"><a href="http://www.gotoandplay.it" target = "_blank">2004 - powered by gotoAndPlay() &nbsp;- </a><font color="#990000"><a href="http://www.gotoandplay.it" target = "_blank"><b>www.gotoandplay.it</b></a></font></font></p>
    <p align="center"><font face="Verdana" size="10" color="#000000" letterSpacing="0.000000" kerning="0"><a href="http://www.gotoandplay.it" target = "_blank">2004 - powered by gotoAndPlay() &nbsp;- </a><font color="#990000"><a href="http://www.gotoandplay.it" target = "_blank"><b>www.gotoandplay.it</b></a></font></font></p>
    <p align="center"><font face="Verdana" size="10" color="#000000" letterSpacing="0.000000" kerning="0"><a href="http://www.gotoandplay.it" target = "_blank">2004 - powered by gotoAndPlay() &nbsp;- </a><font color="#990000"><a href="http://www.gotoandplay.it" target = "_blank"><b>www.gotoandplay.it</b></a></font></font></p>
    -->
    <TABLE WIDTH="100%" HEIGHT="100%" BORDER="0"><TR align="center" valign="middle"><TD><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
     codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
     WIDTH=1366 HEIGHT=768>
     <param name="movie" value="index.swf" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="bgcolor" value="#ffffff" /><EMBED src="index.swf" quality="high" scale="noscale" bgcolor="#ffffff"  WIDTH=1366 HEIGHT=768 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
    </OBJECT></TD></TR></TABLE>
    </BODY>
    </HTML>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center