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);
}


}


what that means, I'm afraid my understanding is not that good.

Gustavo


On Feb 2, 2009, at 10:06 PM, Amy wrote:

--- In flexcoders@yahoogroups.com, Gustavo Duenas LRS <gdue...@...>
wrote:
>
> actually I'm trying to pass the JS var with the availWidth to flex
> in order to be used on
>
>
> var h:number = ExternalInterface.call("getAvailWidth");
> var w:humber = ExternalInterface.call("getAvailHeight");
>
> root.stage.width = w
> root.stage.height=h
>
> assuming I have in the html wrapper
>
> function getAvailWidth{
> and so on}
> This is exactly what I'm trying to accomplish.

You need to be resizing the object/embed tag, not telling Flex to
resize the Application object, so Flex doesn't need to be involved in
the process, unless you want to be able to click a button to initiate
the resize. But all that needs to do is just call a js function, which
should be able to handle it without any info from Flex.




Reply via email to