Groups | Blog | Home
all groups > flash (macromedia) > march 2007 >

flash (macromedia) : Full Screen Help


bcounts
3/20/2007 10:07:17 PM
I am trying to center a movie clip named "mainsite" using the following code,
however, I can not get it to work when I publish and view the site in my web
browser it places the movie way down in the lower right hand corner.


--------------------------------------------------------------------------------
------

var stageL:Object = new Object();
stageL.onResize = function() {
mainsite._x = Stage.width / 2;
mainsite._y = Stage.height / 2;
}
Stage.addListener(stageL);


--------------------------------------------------------------------------------
------

My publish settings are at 100% and flash placement of Left/Top and set for No
Scale!

Anyone have any ideas? Thank you for any help in advance!
ggshow
3/21/2007 12:00:00 AM
ggshow
3/21/2007 3:25:10 AM
try this:


var stageL:Object = new Object();
stageL.onResize = function() {
mainsite._x = (Stage.width - mainsite._width) / 2;
mainsite._y = (Stage.height - mainsite._height) / 2;
}
Stage.addListener(stageL);
bcounts
3/21/2007 4:03:39 AM
this worked - however is there a way to do it in Screen Resize and Screen Enter?

when I first visit the website it does not center it - it only does when I resize the browser window.

bcounts
3/21/2007 5:43:03 AM
AddThis Social Bookmark Button