A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: flash backgrounds and window resizing

  1. #1
    Junior Member
    Join Date
    Nov 2004
    Posts
    25

    flash backgrounds and window resizing

    http://www.conclave.ru/
    On the site above, when you resize the page, the content (or MovieClips) in the page move to fit properly.

    I need to do this for my next project. I want a little MC animated in the bottom left and the navigation in the top right, but I want the flash to fill up the entire page and adjust the MCs justification ..

    I hope that makes sense..
    Navigation justified top right
    Animation justified bottom left of the page.
    with a tiled background

    Does anyone know how this is done or can anyone point me to a tutorial

    Thanks
    Dm
    --------
    (o\_!_/o)

  2. #2
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    Basically you need to embed the movie at 100% height/width and set the Stage.scaleMode to "noScale". Then you can write a Stage.onResize function to reposition the clips when the window is scaled. For the tiled background you could do a lot of things, but you might consider setting the background of the Flash to transparent (wmode="transparent") and then just tile the background on the actual HTML page.

  3. #3
    Junior Member
    Join Date
    Nov 2004
    Posts
    25
    thanks I will look into that.

    I heard that using transparent flash makes the performance a little slow.

    Would it be better to use the background in flash or in the html page.

    thanks
    DM
    --------
    (o\_!_/o)

  4. #4
    Junior Member
    Join Date
    Nov 2004
    Posts
    25
    ok.. I found out how to do the resize..
    I got it working but it doesn't work that great in FireFox, however it works fine in IE
    In FireFox, it will only reposition when you enlarge the window but will not reposition when you shrink the window
    ------------------------------------
    stageListener = new Object();
    stageListener.onResize = function ()
    {
    Nav._x = Stage.width-100;
    Nav._y = 100;

    MainArt._x = 0;
    MainArt._y = Stage.height;
    }
    Stage.addListener(stageListener);
    -------------------------------------

    is this normal

    Thanks again
    Dm
    --------
    (o\_!_/o)

  5. #5
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    Should work just fine in Firefox too, do you have the same version of the plug-in in each?

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