1 Reply Latest reply on Oct 14, 2011 11:16 PM by Shongrunden

    problem trying touse stageWebView on flex mobile

    Gustavo Duenas Level 1

      Hi I've been trying to figured it out , but it seems I've been doing everything by the book, but nothing happens.

       

      here is my code is on a <s:view> and there is no way to call the function, when I wrote public still nothing happens, I know that the answer is maybe easier as I tough.

       

      <?xml version="1.0" encoding="utf-8"?>

      <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"

                          xmlns:s="library://ns.adobe.com/flex/spark" title="Blog-FLS" activate="webView(event)">

        <fx:Declarations>

        <!-- Place non-visual elements (e.g., services, value objects) here -->

        </fx:Declarations>

       

      <fx:Script>

                <![CDATA[

                          import mx.events.FlexEvent;

                          private var stageWebView:StageWebView;

                          public function webView(event:FlexEvent):void{

                                    if (StageWebView.isSupported==true){

                                              stageWebView= new StageWebView();

                                              stageWebView.viewPort = new Rectangle(5,80,stage.width-10,stage.height-90);

                                              stageWebView.stage = this.stage;

                                              stageWebView.loadURL("http://google.com");

       

                                    } else{trace("algo pasa") };

                          }

       

       

       

                ]]>

      </fx:Script>

       

      </s:View>

       

      I don't know how to activate this on the view since it looks impossible to do it from the application itself some help will be appreciated

       

      Gus