Click to See Complete Forum and Search --> : IE issues positioning flash movie
andy_b
08-28-2007, 04:56 PM
Hi,
My splash page to my site is a small flash movie. It is meant to be centered in the middle of the screen. The flash movie detects the screen width and height to do this
Now all works well in firefox 1.5 and firefox 2.0
However "sometimes" in IE6 and IE7 the flash movie is positioned way off the screen upper left and the movie is enlarged such that it looks pixelated. Other times it is positioned slightly off center such that scroll bars are created.
I can supply some actionscript if anyone would like to help.
I can also provide screen shots of the issue.
Thanks
Andy
mneil
08-29-2007, 02:30 PM
pics and scripts would help here. How are you determining screen size? Javascript, and externalInterface?
andy_b
08-30-2007, 12:01 AM
Ok so in the first frame of my splash movie is the code
stage.scaleMode ="noScale";
stage.align = "LT";
i then create a movie clip holder_mc which contains all content
the frame ends with
///// All resize functions to center the stage ////////
holder_mc.onResize = function () {
this._x = Stage.width/2 - this._width/2;
this._y = Stage.height/2 - this._height/2;
}
Stage.addListener(holder_mc);
// execute all listeners to center the stage
holder_mc.onResize();
www.bellophoto.com is my site. It is this splash page that is problematic in IE
thanks
andy_b
08-30-2007, 12:11 AM
So i have uploaded 2 screen shots that illustrate the problem.
www.bellophoto.com/bollox/1.jpg
www.bellophoto.com/bollox/2.jpg
In the first screen shot you will see the page is not centered - note the scroll bars. In the second screen shot you will see that most of the page is missing off to the screens top left.
i appreciate any help
thanks
Andy
Centauri
08-30-2007, 03:15 AM
Seems to be over complicated - centering can be done via css : http://garyblue.port5.com/webdev/vcenter-css.html
mneil
08-30-2007, 11:13 AM
Yes, you can use CSS or tables to center your embeded flash content. The stageListener will only move things in flash. If you're swf is 800x600(lets just say) and your screen is 1024x1280 then the stage listener isn't going to help you any. You have to center the actual embeded swf in the html document. Like I said, you can use css or tables to do the work; I'd suggest CSS since it is the way everything is going and Centauri's link shows a perfect way to do it. View the page source
Centauri
08-30-2007, 11:19 AM
Actually, I have just found out that the method used in that link does not work in IE7. This subject is also being discussed in this thread (http://www.webdeveloper.com/forum/showthread.php?t=159490) and the code I posted there works quite nicely.