dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Resizing Movie Clip

  1. #1
    Junior Member
    Join Date
    Jun 2009
    Posts
    16

    Resizing Movie Clip

    This should be simple enough but for some reason it's not.

    I've created a movieClip using illustrator, which is a radial gradient in a rectangle. Original size is 1024 x 125. However I want the width to be whatever size the NativeWindow is. Not the stage but the nativeWindow. No matter what I try the width always comes out to 1024 (unless I specifically give it a size, like headerBg.width = 300. I'd like it to constantly stay the same size as the nativeWindow whenever that window is resized as well, but right now I can't even get the initial instance to display correctly. Any hints?

  2. #2
    Pixel Artéést chriso20's Avatar
    Join Date
    Apr 2003
    Location
    Notts, UK
    Posts
    325
    What code are you using to resize the movieClip currently?

  3. #3
    Junior Member
    Join Date
    Jun 2009
    Posts
    16
    I figured out a work around in that I made the initial window not visible and added a new window so I could refer to that instance.

    Now I'm using:

    headerBg.width = mainWin.width;

    headerBg is the movieClip and mainWin is the new Window.

    before I was trying to set a variable also called mainWin and trying

    mainWin = this.stage.nativeWindow;
    headerBg.width = mainWin.width;

    but that wasn't working. If I would have just left the initial window visible how do I refer to that instance?

  4. #4
    Pixel Artéést chriso20's Avatar
    Join Date
    Apr 2003
    Location
    Notts, UK
    Posts
    325
    I really don't know anything about nativeWindow to be honest...

    Sorry!

  5. #5
    Señor Member Mavrisa's Avatar
    Join Date
    Oct 2005
    Location
    Canada
    Posts
    506
    The only thing I can think of is that you aren't exporting to AIR... Have you made sure of this?
    Haikus are easy
    But sometimes they don't make sense
    Refrigerator

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