;

PDA

Click to See Complete Forum and Search --> : Resizing Movie Clip


tcalvin
07-03-2009, 07:45 PM
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?

chriso20
07-03-2009, 11:53 PM
What code are you using to resize the movieClip currently?

tcalvin
07-04-2009, 01:27 AM
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?

chriso20
07-04-2009, 03:22 AM
I really don't know anything about nativeWindow to be honest...

Sorry!

Mavrisa
07-04-2009, 11:56 AM
The only thing I can think of is that you aren't exporting to AIR... Have you made sure of this?