Return-Path: X-Original-To: apmail-flex-users-archive@www.apache.org Delivered-To: apmail-flex-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D06DFD517 for ; Wed, 15 May 2013 18:11:13 +0000 (UTC) Received: (qmail 34789 invoked by uid 500); 15 May 2013 18:11:13 -0000 Delivered-To: apmail-flex-users-archive@flex.apache.org Received: (qmail 34759 invoked by uid 500); 15 May 2013 18:11:13 -0000 Mailing-List: contact users-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@flex.apache.org Delivered-To: mailing list users@flex.apache.org Delivered-To: moderator for users@flex.apache.org Received: (qmail 61388 invoked by uid 99); 15 May 2013 17:51:13 -0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of admin@billingapp.pw designates 77.88.46.6 as permitted sender) Message-ID: <06918A45E3A04801AA3ED1FD081770C2@ArvindPC> From: "Admin Billing App" To: "Apache Flex" Subject: Flex Beginner-- Unable to display web page within 2 StageWebViews on single screen app Date: Wed, 15 May 2013 23:11:41 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_019D_01CE51C1.8F411C30" X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 16.4.3505.912 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3505.912 X-Virus-Checked: Checked by ClamAV on apache.org ------=_NextPart_000_019D_01CE51C1.8F411C30 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello all, I am a newbie to using Flex, and I am now creating a simple Flex app-> = this has a single screen having 2 StageWebViews =E2=80=93> both are used = to display different web pages within them. ( I am trying to create simple mobile apps that do this). For some reason, both StageWebViews are showing blank- This is the code in the main mxml file-- These are the initial variables declared-- import mx.events.FlexEvent; import spark.events.ViewNavigatorEvent; protected var adArea:StageWebView; protected var mainArea:StageWebView; protected var adFile:File; protected var mainFile:File; protected var actualurl:String=3D new String(); This is the content of the init function-- protected function init(event:ViewNavigatorEvent):void { addEventListener(Event.ADDED_TO_STAGE, createAd); addEventListener(Event.ADDED_TO_STAGE, createMain); } Now the =E2=80=9CcreateAd=E2=80=9D and =E2=80=9CcreateMain=E2=80=9D = functions are nearly identical in functionality=E2=80=94> they basically = open 2 different web pages in the 2 StageWebViews named = =E2=80=9CadArea=E2=80=9D and =E2=80=9CmainArea=E2=80=9D respectively. Now I am giving below the code for =E2=80=9CcreateMain=E2=80=9D-- protected function createMain(e:Event):void { removeEventListener(Event.ADDED_TO_STAGE, createMain); mainArea =3D new StageWebView(); mainArea.stage =3D stage; mainArea.viewPort =3D new Rectangle(0, 160, stage.width, = stage.height); mainArea =3D new StageWebView(); mainArea.addEventListener(LocationChangeEvent.LOCATION_CHANGE, = mainAreaLocationChange); mainArea.stage =3D stage; actualurl=3D"http://www.msn.com/"; mainArea.loadURL(actualurl); } And finally given below is the function = =E2=80=9CmainAreaLocationChage=E2=80=9D-- protected function = mainAreaLocationChange(event:LocationChangeEvent):void { if (mainArea.location !=3D actualurl) { navigateToURL(new URLRequest(event.location)); adArea.loadURL(actualurl); } } As I mentioned before, when I run the above program=E2=80=94both the web = views simply show up as white blank areas. I am not sure what I am doing = wrong here? I am using Flash Builder 4.6/4.7 Premium on Windows 8 (x64). Any help would be appreciated. Yours sincerely, Arvind. ------=_NextPart_000_019D_01CE51C1.8F411C30--