--- In [email protected], Gustavo Duenas LRS <gdue...@...> wrote: > > thanks Amy, but it seems when I try to tell the document in Js about > the new size, that > it is not doing the resize, Example is trying to do the sizing in the > document for vista and > others like > > document.width = screen.availWidth; > document.height= screen.availHeight; > > those arguments work in theory but it seems they are not working in > Vista or XP... > I don't what else to do, actually I have an odd error in the > application: > > TypeError: Error #1009: Cannot access a property or method of a null > object reference. > at lrsAd/resizerFlash() > at lrsAd/___Application1_creationComplete() > at flash.events::EventDispatcher/dispatchEventFunction() > at flash.events::EventDispatcher/dispatchEvent() > at mx.core::UIComponent/dispatchEvent() > at mx.core::UIComponent/set initialized() > at mx.managers::LayoutManager/doPhasedInstantiation() > at Function/http://adobe.com/AS3/2006/builtin::apply() > at mx.core::UIComponent/callLaterDispatcher2() > at mx.core::UIComponent/callLaterDispatcher() > > this is the flash windows that appears now in my browser. > > > //code for the application: > > creationComplete="resizerFlash()" > > here is the code in the flex: > > > //importamos los datos para el external interface// > import flash.external.ExternalInterface; > > //funcion para usar la external interface// > public function resizerFlash():void{ > > var h:int; > var w:int > > if (ExternalInterface.available){ > > > h= ExternalInterface.call( "movieHeight"); > root.stage.height = h; > w=ExternalInterface.call( "movieWidth"); > root.stage.width = w; > trace(h); > trace(w); > } > > > }
Set your Application width and height to 100%. Then, when javaScript resizes the Object and/or Embed tag (NOT the document!!!!), then the Application will resize itself appropriately. You may want to do some basic experimentation and/or research on DHTML. That's beyond the scope of this forum.

