2 Replies Latest reply on May 12, 2006 2:26 AM by Newsgroup_User

    Scaling & position an SWF

    Level 7
      Dreamweaver 8 Flash 8

      I need to position a movie top left.

      Then whichever resolution or screen size allow the movie to fill the screen
      without stretching.

      Hope this makes sense


      Cheers

      SteveW.


        • 1. Re: Scaling & position an SWF
          Level 7
          In DW, make the movie object 100% by 100% and then add the following
          ActionScript to the Flash (make sure the Flash movie is big enough to
          accommodate):

          Stage.align = "TL";
          Stage.scaleMode = "noScale";
          sizeListener = new Object();
          sizeListener.onResize = function() {
          centered._x = Stage.width/2
          centered._y = Stage.height/2
          centered._width = Stage.width * .5
          };
          Stage.addListener(sizeListener);
          sizeListener.onResize();


          --
          Nancy Gill
          Adobe Community Expert
          BLOG: http://www.dmxwishes.com/blog.asp
          Author: Dreamweaver 8 e-book for the DMX Zone
          Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
          Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A Beginner's
          Guide, Mastering Macromedia Contribute
          Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web Development


          "SteveW" <Stevewarby@btinternet.com> wrote in message
          news:e3vrrr$lrq$1@forums.macromedia.com...
          > Dreamweaver 8 Flash 8
          >
          > I need to position a movie top left.
          >
          > Then whichever resolution or screen size allow the movie to fill the
          > screen without stretching.
          >
          > Hope this makes sense
          >
          >
          > Cheers
          >
          > SteveW.
          >


          • 2. Re: Scaling &amp; position an SWF
            Level 7
            Thanks for the info.
            I added your code to my actions layer.

            In DW I have set Scale to:

            default(Showall)

            and change the code to:

            <embed src="Affiliates5.swf" width="100%" height="100%" align="texttop"
            quality=high
            pluginspage=" http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
            type="application/x-shockwave-flash"></embed>

            When I preview I get my movie:
            top left
            approx 50% size
            The movie is not streched within the window
            ie I cannot see all the movie.

            Am I missing something here...


            Cheers


            SteveW


            "Nancy *ACE*" <nancy@webwish.com> wrote in message
            news:e3vtqb$oet$1@forums.macromedia.com...
            > In DW, make the movie object 100% by 100% and then add the following
            > ActionScript to the Flash (make sure the Flash movie is big enough to
            > accommodate):
            >
            > Stage.align = "TL";
            > Stage.scaleMode = "noScale";
            > sizeListener = new Object();
            > sizeListener.onResize = function() {
            > centered._x = Stage.width/2
            > centered._y = Stage.height/2
            > centered._width = Stage.width * .5
            > };
            > Stage.addListener(sizeListener);
            > sizeListener.onResize();
            >
            >
            > --
            > Nancy Gill
            > Adobe Community Expert
            > BLOG: http://www.dmxwishes.com/blog.asp
            > Author: Dreamweaver 8 e-book for the DMX Zone
            > Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
            > Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A
            > Beginner's
            > Guide, Mastering Macromedia Contribute
            > Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web
            > Development
            >
            >
            > "SteveW" <Stevewarby@btinternet.com> wrote in message
            > news:e3vrrr$lrq$1@forums.macromedia.com...
            >> Dreamweaver 8 Flash 8
            >>
            >> I need to position a movie top left.
            >>
            >> Then whichever resolution or screen size allow the movie to fill the
            >> screen without stretching.
            >>
            >> Hope this makes sense
            >>
            >>
            >> Cheers
            >>
            >> SteveW.
            >>
            >
            >