2 Replies Latest reply on Nov 27, 2006 10:53 AM by Applied CD

    Repositioning / Resizing an MPEG

    dzeici
      Hello All

      My name's Mike. I'm using MX2004, and I'm a student, so I can't afford any Xtras:). I am importing an MPEG video into a placeholder (shape) sprite using the following code:

      sprite(3).member.importFileInto(gMediaFilename)

      This works, but I want to resize / reposition the sprite. I try (for example) the following code:

      sprite(3).width =200
      sprite(3).height =100

      and it does not work. Neither does changing the regpoint, or the location. I cannot create the member / sprite using: new (#movie) because the sprite then vanishes as soon as a branch command is reached (e.g. go to frame x).

      Any help would be massively appreciated.

      Thanks for your time

      Mike
        • 1. Re: Repositioning / Resizing an MPEG
          Level 7
          How about changing it's rect to a larger size.


          "dzeici" <webforumsuser@macromedia.com> wrote in message
          news:ek4q08$isi$1@forums.macromedia.com...
          > Hello All
          >
          > My name's Mike. I'm using MX2004, and I'm a student, so I can't afford any
          > Xtras:). I am importing an MPEG video into a placeholder (shape) sprite
          > using
          > the following code:
          >
          > sprite(3).member.importFileInto(gMediaFilename)
          >
          > This works, but I want to resize / reposition the sprite. I try (for
          > example)
          > the following code:
          >
          > sprite(3).width =200
          > sprite(3).height =100
          >
          > and it does not work. Neither does changing the regpoint, or the location.
          > I
          > cannot create the member / sprite using: new (#movie) because the sprite
          > then
          > vanishes as soon as a branch command is reached (e.g. go to frame x).
          >
          > Any help would be massively appreciated.
          >
          > Thanks for your time
          >
          > Mike
          >
          >


          • 2. Re: Repositioning / Resizing an MPEG
            Applied CD Level 1
            When I use a proxy (placeholder) I try to replace one member with a member of the same type (ie: video for video, bitmap for bitmap, etc..). If that’s not possible try using a 1 pixel x 1 pixel bitmap stretched to whatever size you need rather than a vector based rectangle for the proxy. I’ve never tried it with video but I know swapping a vector shape with a bitmap leads to all sorts of trouble if you try to move, scale, rotate, or perform any other transformation on the sprite after the swap. It works fine if the member types match.