A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: "showAll" scaling in browser weirdness

  1. #1
    Senior Member
    Join Date
    Apr 2005
    Posts
    118

    "showAll" scaling in browser weirdness

    Here's the code I'm using, and it works fine(ish) :

    fscommand("fullscreen", "true");
    fscommand("allowscale", "false");
    Stage.scaleMode = "showAll";

    BUT --- Here's my problem; while this .swf scales (in the .html file) the way I want it to, it has an annoying issue -- it shows the grey "artboard" in between the actual .swf and the pages' black background. Does anyone know how to make this area black instead of grey?

    If I use "noBorder" the grey artboard disappears, but it then crops the swf when resizing, which I don't want ...

    Also - does anyone know how to make the browser toolbars disappear (from within flash)?

  2. #2
    Qwaizang:syntax_entity_ Q__Hybrid's Avatar
    Join Date
    Aug 2005
    Posts
    270
    Eileen,

    Using fscommand("allowscale", "false") is synonymous with using Stage.scaleMode = "noScale". The third line of your script effectively voids the second line by re-assigning the Stage.scaleMode property.

    You can set the background color of an embedded SWF by using the "bgcolor" parameter inside the html OBJECT and EMBED tags.

    To eliminate the browser toolbars, you will have to incorporate javascript into your project. Sorry, I don't have any tutorials for these issues.

    +Q__
    Qwai•zang \kwî-'zan\ n [origin unknown] 1 : abstract designer, esp. of complex real-time experiments, c. 21st century

  3. #3
    Senior Member
    Join Date
    Apr 2005
    Posts
    118
    Thanks for your help - I knew those two lines of code were similar; I just kept trying to make it work and I guess I got confused.

    It's not embedded in the html - it's being called by an (embedded) external preloader, which displays with the black background. Any ideas why the second swf wouldn't adopt the EMBED and OBJECT parameters of the external preloader?

  4. #4
    Qwaizang:syntax_entity_ Q__Hybrid's Avatar
    Join Date
    Aug 2005
    Posts
    270
    Eileen,

    I take it you're nesting another SWF inside of your preloader by bringing it in with loadMovie()? Is the background of the nested SWF gray?

    Here's what I would do. Create an empty movieclip in your preloader, set its _alpha property to 0, and draw a black rectangle inside of it equal in size to the dimensions of the nested SWF's document settings (using the drawing API).

    Line up this movieclip with the registration of the nested SWF's _x and _y properties, then use setMask() to apply the black rectangle to the nested SWF once it is fully loaded.

    This should make the gray disappear.
    +Q__
    Qwai•zang \kwî-'zan\ n [origin unknown] 1 : abstract designer, esp. of complex real-time experiments, c. 21st century

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center