3 Replies Latest reply on Sep 19, 2009 11:58 AM by ajineshravi

    Please help

    MissingGio Level 1

      hello everyone, I tried but still can't do. well I wonder how could I make a bar top or bottom which doesn't move when window resizes like that http://www.flashden.net/files/58963/index.html

        • 1. Re: Please help
          ajineshravi

          hi,

          you need to set flash height and width to 100% in html embed and object tag..

          then use action script inside flash movie to set the "y" position of "bar" movieclip = Stage.height-height of movieclip

          you need to set this on every resize of browser .. so use Stage.onResize method in action script

           

          see the script below...

           

           

           

          obj=new Object();

          alignbottom(); //align first time

           

          list.onResize=function() //align on every resize of browser
          {
              alignbottom();
          }

           

           

          function alignbottom()

          {

           

               bar_mc._y=Stage.height-bar_mc._height;   //bar_mc is the movieclip you want to align at bottom

           

          }

           

          Stage.addListener(obj);

          Stage.scaleMode="noScale";  //use this to remove scaling of flash

          Stage.align="TL" //allign flash to Top Left

          • 2. Re: Please help
            MissingGio Level 1

            thank you  very much, but with this script my black bar is centered and bottomed and it has exact size and I wanted that it was stretched on 100%

             

            sorry for my bad english

            • 3. Re: Please help
              ajineshravi Level 1

              hi,

               

              it so simple!!

               

              just add this two line to alignbottom() function


              bar_mc._x=0;
              bar_mc.bar_bg_mc._width=Stage.width;

               

              bar_bg_mc is the movieclip instance inside bar_mc which is the black background color to be stretch

               

              and pls correct a small mistake on previous script that i typed "list" instead of "obj" in 3rd line of script. So pls correct it to obj.onResize=function (not list.onResize)


              modified script is given below:


              obj=new Object();
              alignbottom(); //align first time


              obj.onResize=function() //align on every resize of browser
              {
                  alignbottom();
              }

               

              function alignbottom()
              {
                   bar_mc._y=Stage.height-bar_mc._height;   //bar_mc is the movieclip you want to align at bottom
                   bar_mc._x=0;
                   bar_mc.bar_bg_mc._width=Stage.width; //bar_bg_mc is the movieclip inside bar_mc which is the black  background color to be stretch to 100%
              }


              Stage.addListener(obj);
              Stage.scaleMode="noScale";  //use this to remove scaling of flash
              Stage.align="TL" //allign flash to Top Left

               

               

              Check attached source file, if any doubt...