stop resize swf

  • trynnity
  • Born
  • Born
  • trynnity
  • Posts: 1

Post 3+ Months Ago

I have one problem, i am not Sure how to define it to search for it on google, i'm sure that is a lot of answer on the internet, but i will try here...

How to stop resizeing my fullsrean swf movie when the size of the browser reach the original size of swf, after that if i resize browser to be smaller scroll will bi show up....

example.... http://www.rolex.com/en/

my AS2 code is
Code: [ Select ]
//start Stage re-size code
Stage.align = "TL";
Stage.scaleMode = "noScale";
// ---> Create a new listener object
var stageListener:Object = new Object();
// ---> Define the resize function...
stageListener.onResize = function() {
    // ---> first, get the new dimensions of the stage....
     var stageWidth:Number = Math.round(Stage.width);
     var stageHeight:Number = Math.round(Stage.height);
     trace("Stage size is now " + Stage.width + " by " + Stage.height);
     // ---> now, set the footer BG w & h to the stage dimensions...
     footerBG_mc._width = stageWidth;
     //footerBG_mc._height = stageHeight;
     footerBG_mc._x = 2;
     footerBG_mc._y = stageHeight-25;
     // ---> now, set the footer links to the stage dimensions...
     footerLinks_mc._x = (stageWidth/2) - (footerLinks_mc._width/2) ;
     footerLinks_mc._y = stageHeight-18;
     // ---> now, set the background clip alignment to match stage...
     wallPaper_mc._x = (stageWidth/2) - (wallPaper_mc._width/2);
     //wallPaper_mc._y = stageHeight/2;
    
     // ---> now, size the outLine_mc to the stage dimensions...
     //outLine_mc._height = stageHeight-2;
     //outLine_mc._width = stageWidth;
     outLine_mc._x = (stageWidth/2) - (outLine_mc._width/2);
     //outLine_mc._y = (stageHeight/2) - (wallPaper_mc._height/2);

};
// ---> Apply the listener...
Stage.addListener(stageListener);
// ---> Run the function...
stageListener.onResize();

//--------------------//
Mouse.hide();
var followMe:Object= new Object()
followMe.onMouseMove=function(){
    newMouse._x=_xmouse;
    newMouse._y=_ymouse;
}
Mouse.addListener(followMe)
  1. //start Stage re-size code
  2. Stage.align = "TL";
  3. Stage.scaleMode = "noScale";
  4. // ---> Create a new listener object
  5. var stageListener:Object = new Object();
  6. // ---> Define the resize function...
  7. stageListener.onResize = function() {
  8.     // ---> first, get the new dimensions of the stage....
  9.      var stageWidth:Number = Math.round(Stage.width);
  10.      var stageHeight:Number = Math.round(Stage.height);
  11.      trace("Stage size is now " + Stage.width + " by " + Stage.height);
  12.      // ---> now, set the footer BG w & h to the stage dimensions...
  13.      footerBG_mc._width = stageWidth;
  14.      //footerBG_mc._height = stageHeight;
  15.      footerBG_mc._x = 2;
  16.      footerBG_mc._y = stageHeight-25;
  17.      // ---> now, set the footer links to the stage dimensions...
  18.      footerLinks_mc._x = (stageWidth/2) - (footerLinks_mc._width/2) ;
  19.      footerLinks_mc._y = stageHeight-18;
  20.      // ---> now, set the background clip alignment to match stage...
  21.      wallPaper_mc._x = (stageWidth/2) - (wallPaper_mc._width/2);
  22.      //wallPaper_mc._y = stageHeight/2;
  23.     
  24.      // ---> now, size the outLine_mc to the stage dimensions...
  25.      //outLine_mc._height = stageHeight-2;
  26.      //outLine_mc._width = stageWidth;
  27.      outLine_mc._x = (stageWidth/2) - (outLine_mc._width/2);
  28.      //outLine_mc._y = (stageHeight/2) - (wallPaper_mc._height/2);
  29. };
  30. // ---> Apply the listener...
  31. Stage.addListener(stageListener);
  32. // ---> Run the function...
  33. stageListener.onResize();
  34. //--------------------//
  35. Mouse.hide();
  36. var followMe:Object= new Object()
  37. followMe.onMouseMove=function(){
  38.     newMouse._x=_xmouse;
  39.     newMouse._y=_ymouse;
  40. }
  41. Mouse.addListener(followMe)





and on the HTML page is



Code: [ Select ]
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<style type="text/css">
#center { position: absolute; top: 50%; width: 100%; height: 1px; overflow: visible }
#main { position: absolute; left: 50%; width: 100%; margin-left: -50%; height: 600px; top: -300px; background-color:"#cccccc"}
body {
    overflow-x:visible;
    background-color: #333333;
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}
</style>
<title>Centered</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="swfobject.js"></script>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>

</head>
<body>
     <div id="center" >
     <div id="main">
     <img src="950x10.jpg" alt="" />
        <script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','100%','height','600','src','main','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','main' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="950" height="600">
            <param name="movie" value="main.swf" />
            <param name="quality" value="high" />
     <embed src="main.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="950" height="600"></embed>
         </object></noscript>
    
</div>
</div>
</body>
</html>
  1.     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  3. <head>
  4. <style type="text/css">
  5. #center { position: absolute; top: 50%; width: 100%; height: 1px; overflow: visible }
  6. #main { position: absolute; left: 50%; width: 100%; margin-left: -50%; height: 600px; top: -300px; background-color:"#cccccc"}
  7. body {
  8.     overflow-x:visible;
  9.     background-color: #333333;
  10.     margin-left: 0px;
  11.     margin-top: 0px;
  12.     margin-right: 0px;
  13.     margin-bottom: 0px;
  14. }
  15. </style>
  16. <title>Centered</title>
  17. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  18. <script type="text/javascript" src="swfobject.js"></script>
  19. <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
  20. </head>
  21. <body>
  22.      <div id="center" >
  23.      <div id="main">
  24.      <img src="950x10.jpg" alt="" />
  25.         <script type="text/javascript">
  26. AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','100%','height','600','src','main','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','main' ); //end AC code
  27. </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="950" height="600">
  28.             <param name="movie" value="main.swf" />
  29.             <param name="quality" value="high" />
  30.      <embed src="main.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="950" height="600"></embed>
  31.          </object></noscript>
  32.     
  33. </div>
  34. </div>
  35. </body>
  36. </html>
my page
http://www.dupli.co.yu/index22.html
  • suzie
  • Guru
  • Guru
  • User avatar
  • Posts: 1134
  • Loc: England

Post 3+ Months Ago

Why does Flash have to be so complicated - get Swishing...hahahaahahha

Watch the Flash gurus now come rushing in guns blazing.

:mrgreen: :mrgreen:

***My reply will get you noticed with an answer - soz I don't Flash.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 8 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.