Hello Mike,

You should use another object (Object) as listener.
Just replace your code with the following:

//SET STAGE PROPERTIES
Stage.showMenu = false;
Stage.scaleMode = "noScale";
Stage.align = "LT";

//RESIZE EXTERNAL JPG
var tmp:MovieClip;
tmp = this.createEmptyMovieClip("bgExpand_mc", 1);
tmp.loadMovie("img4test/r02.jpg");

var tmp1:Object = new Object();
tmp1.onResize = function(){
            _root.tmp._width = Stage.width;
           _root.tmp._height = Stage.height;
};

Stage.addListener(tmp1);



// ==== It will work ;-).



-- 
Best regards,
 GregoryN                        
================================
http://GOusable.com
Flash components development.
Usability services.

> Date: Tue, 6 Dec 2005 12:09:34 -0600
> From: "Brumm, Mike" <[EMAIL PROTECTED]>
> Subject: [Flashcoders] external jpg resize script
> To: "'Flashcoders mailing list'" <[email protected]>
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain;       charset="US-ASCII"
> 
> Hello,
> 
>  
> 
> I'm probably missing something very simple here. I would like to load an
> external jpg into a movieclip. When the user resizes the stage, the width
> and height of the jpg match that of the stage. The below script does not
> seem to be working. I can't seem to figure out what's missing. Any ideas?
> 
>  
> 
> Thanks in advance,
> 
> Mike
> 
>  
> 
>  
> 
> //SET STAGE PROPERTIES
> 
> Stage.showMenu = false;
> 
> Stage.scaleMode = "noScale";
> 
> Stage.align = "LT";
> 
>  
> 
> //RESIZE EXTERNAL JPG
> 
> var tmp:MovieClip;
> 
> tmp = this.createEmptyMovieClip("bgExpand_mc", 1);
> 
> tmp.loadMovie("images/background/bg_image1.jpg");
> 
>  
> 
> tmp.onResize = function(){
> 
>             this._width = Stage.width;
> 
>             this._height = Stage.height;
> 
> }           
> 
>  
> 
> Stage.addListener(tmp);
> 
>  
> 
>  
> 
>  


_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to