Sorry if I'm missing your exact question... but I just create a swf and
center it in a div like this....It's a funky way to do it but it works
DIV.container
{
width: 800px;
left: 50%;
margin-left: -400px;
}
On Tue, May 13, 2008 at 3:28 PM, Patrick J. Jankun <[EMAIL PROTECTED]> wrote:
> Hello again!
>
> Im quite desparate after trying to find a simply and yet efficient way to
> get my content always in the middle of that stage,
> i wrote simple script, that seems to be working when i launch the stand
> alone player, however when i launch it with the html
> wrapper and in browser, the positions are different (?!?) and i cant
> figure out why, this is probably very stupid, but before
> i just wanted to know how you ppl solve the centering / positioning
> problems in flash/stage
>
> my awesome script:
>
> private function positionContainer() : void {
> _lastBgX = _bg.x;
> _lastBgY = _bg.y;
> var halfW : Number = this.width / 2;
> var halfH : Number = this.height / 2;
> _bg.x = 0;
> _bg.y = 0;
> _bg.width = stage.stageWidth;
> _bg.height = stage.stageHeight;
> _holder.x = (stage.stageWidth / 2) - (_holder.width / 2);
> _holder.y = (stage.stageHeight / 2) - (_holder.height / 2);
> }
>
> _bg is scale, as it's a simple sprite filled with bitmapdata, just for
> testing, and it does what it's suppose to do,
> _holder is my content holder wher i put all my instances, movieclips and
> so on something i dont get is,
> if i have a class that generates something bigger then that _holder
> [width/height] the things starts too look strange
>
> I think i dont really get how that html wrapper works and what are the
> best settings for an fullscreen flash in html
> should i pass settings to the stage class? if yes then which makes sense?
> How do you ppl solve that issue?
>
> Thanks for your Help!
> P.
> ------------------------------------------
> fancy skills to pay the bills
> www.jankun.org
>
> Phone: +43 660 96 969 - 01
> web: jankun.org
> mail: p[at]jankun.org
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders