stop resize swf
- trynnity
- Born


- Joined: May 24, 2008
- Posts: 1
- Status: Offline
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
and on the HTML page is
my page
http://www.dupli.co.yu/index22.html
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)
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)
- //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)
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>
<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>
- <!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>
http://www.dupli.co.yu/index22.html
- Anonymous
- Bot


- Joined: 25 Feb 2008
- Posts: ?
- Loc: Ozzuland
- Status: Online
May 24th, 2008, 1:21 pm
- suzie
- Guru


- Joined: Feb 07, 2004
- Posts: 1127
- Loc: England
- Status: Offline
Page 1 of 1
To Reply to this topic you need to LOGIN or REGISTER. It is free.
Post Information
- Total Posts in this topic: 2 posts
- Users browsing this forum: No registered users and 65 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
