Stage Webview on new screen

I'm trying to get Stagewebview to show on a new stage when a button is clicked.  Right now it just shows on the same stage  becuase code is this.stage.
Also, when it shows up on the new page I want to have back button, forward, and refresh and I want it on the top and not taking alot of space and only on the screen where it's showing the web view.
Please help!!!!!!!!!!
Here is the code:
stop();
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.MouseEvent;
import flash.net.URLRequest;
import flash.media.StageWebView;
import flash.geom.Rectangle;
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
var webView:StageWebView;
var swvRect:Rectangle;
var swvHeight:Number;
var uiElemsTop:Number=140;
var swvY:Number=140;
var uiElemsBot:Number=40+20+75+20;
var uiElemsHeight:Number=uiElemsTop+uiElemsBot;
infoBox.text="";
infoBox.visible=false;
mainPanel.visible=false;
webBtnsPanel.visible=false;
mcStart.addEventListener(MouseEvent.CLICK,init);
function init(e:MouseEvent):void {
    mcStart.removeEventListener(MouseEvent.CLICK,init);
    mcStart.visible=false;
    mainPanel.btnExit.addEventListener(MouseEvent.CLICK, exitApp);
    mainPanel.btnCloseSwv.addEventListener(MouseEvent.CLICK,closeSwv);
    mainPanel.btnOpenSwv.addEventListener(MouseEvent.CLICK, openSwv);
    infoBox.text="Click open stage web view to begin";
    webBtnsPanel.btnNext.addEventListener(MouseEvent.CLICK, nextPage);
    webBtnsPanel.btnPrev.addEventListener(MouseEvent.CLICK, prevPage);
    webBtnsPanel.btnReload.addEventListener(MouseEvent.CLICK, reloadPage);
    webBtnsPanel.btnStop.addEventListener(MouseEvent.CLICK, stopPage);
    swvHeight=stage.stageHeight-uiElemsHeight;
    infoBox.x=stage.stageWidth/2-infoBox.width/2;
    infoBox.y=stage.stageHeight-40;
    mainPanel.x=stage.stageWidth/2-mainPanel.width/2;
    webBtnsPanel.x=stage.stageWidth/2-webBtnsPanel.width/2;
    webBtnsPanel.y=140+swvHeight+20;
    mainPanel.visible=true;
    infoBox.visible=true;
//When the user taps on Exit button, the app quits.
function exitApp(event:MouseEvent):void {
    NativeApplication.nativeApplication.exit(0);
function closeSwv(event:MouseEvent):void {
    if(webView==null){
        return;
     webView.removeEventListener(ErrorEvent.ERROR,onError);
     webView.removeEventListener(LocationChangeEvent.LOCATION_CHANGING,onChanging);
     webView.removeEventListener(Event.COMPLETE,onComplete);
     webView.viewPort=null;
     webView.dispose();
     webView=null;
     webBtnsPanel.visible=false;
     infoBox.text="Click open stage web view to begin";
function openSwv(event:MouseEvent):void {
    if(webView!=null){
        return;
     webBtnsPanel.visible=true;
     infoBox.text="";
     webView=new StageWebView();
     webView.stage= next.stage;
     webView.viewPort=new Rectangle(0,swvY,stage.stageWidth,swvHeight);
     webView.addEventListener(ErrorEvent.ERROR,onError);
     webView.addEventListener(LocationChangeEvent.LOCATION_CHANGING,onChanging);
     webView.addEventListener(Event.COMPLETE,onComplete);
     webView.loadURL("http://www.math.uri.edu/~bkaskosz/webview/index.html");
function onError(e:ErrorEvent):void {
    infoBox.text="Page is not available. Try reloading.";
function onChanging(e:LocationChangeEvent):void {
    infoBox.text="Loading...";
function onComplete(e:Event):void {
    infoBox.text="";
function nextPage(e:MouseEvent):void {
    if(webView==null){
        return;
    if(!webView.isHistoryForwardEnabled){
        return;
    webView.historyForward();
function prevPage(e:MouseEvent):void {
    if(webView==null){
        return;
    if(!webView.isHistoryBackEnabled){
        return;
    webView.historyBack();
function reloadPage(e:MouseEvent):void {
    if(webView==null){
        return;
    webView.reload();
function stopPage(e:MouseEvent):void {
    if(webView==null){
        return;
    webView.stop();

as to be on a new stage , just add it to a diff frame in your porject.
so lets say you init iate the code in frame 3 , then create a button in frame 1 or any other frame so that when you click the button the stage webview will open in the other frame .
what so ever , dont use the code you have now . the code you provided is already scaled to fit elements on stage , you dont want that
use  a simple web view code such as this .
var webView:StageWebView = new StageWebView();
webView.stage = this.stage;
webView.viewPort = new Rectangle(0, 0,0,840 ); /// the numbers in here are to scale
webView.loadURL( "http://ameerw.com" );
[your button].addEventListener(MouseEvent.CLICK, closeWebView);
function closeWebView(e:MouseEvent):void
     webView.stage = null;
     webView.dispose();
where i  marked numbers to scale make sure you do not scale the webview to fit the whole stage . you need an extra space to
create the bakc button . back button will be used for 2 things . one to remove/dispose the webview then navigate to which ever frame you want it to go to .
i used a function to do this . and you can just create a navigation function etc . for the same button.

Similar Messages

  • I got a new screen on my phone yesterday then half an hour later my phone turned now it has been off for the last 12 hours can someone help me?

    i got a new screen on my iphone 4 it had 35% battery left i can hear people ring but i cant do anything with it it happeed yesterday ive tried the on and off and snooze but still wont work any ideas anyone please?

    Hi,
         Yes i understand this but most electronics that fail, will fail during the very early stages of there life. It sounds like either the screen or one of it's associated components has failed again.
    Of the many screens i have changed i have had three dead out of the box and two failed within the first week of operation.
    They make them in huge numbers and work on a known failure rate for all screen panels large and small.
    Cheers!

  • I just got  new screen put on my 13in macbook pro when i opend it up there is no data on it? how do i get my data back

    I just got to school after getting a new screen put on my 13in macbook pro. when i opend up my macbook there was only a apple simble and the loading sing with a bar at the botton it took fovere to load, one it loaded and opend up there was a few options to pic from saying i could get all my datata back, i got confused and called the tec support where they wanted me to spend 90$ to back up my data, i feel as if they fixed my screen my data should be there when i go on it. I am a broke colage studend and need to get my work done. To sum it all up How do i get all my data back that happend to get lost while my screen was being repaird at the apple store?

    Apple has a 90 warranty warranty on all of their repairs.  You should take your computer back to the repair shop.  Or call Apple Customer Relations (800) 767-2775.  Wait for a human to come on the line and ask politely and firmly that you want to be transferred over to the Customer Relations department.  Tell them your issue.
    pakoning wrote:
    I am a broke colage studend
    Hard to believe with all the typos in your post!

  • Need Help to create new screen for RF Sapconsole

    Hi Guru's
    I'm new on RF (but some years in ABAP) since last week.
    I need help to create new screens for RF (SAPLLMOB).
    Can someone explain me the procedure to create screen (with ABAP code after) or perhaps someone have an exemple (simple or not) ?
    I have to develop 2 new screens with really few time.
    And, another subsidiary question :
    how SAP can transfert information between the flash gun and the screen i have developped.
    Is there some code to add to enable this functionality or it is include in SAPLLMOB on standard fields ????
    It's a new strange world for me today...
    Many thanks to everyone who can explain me
    Alain

    hi,
    I am facing this problem as well. Is there any reference to create the new screen?
    Hope someone can help! Thanks!
    Regards,
    Darren

  • TS1398 I recently got a new screen for my iPhone 4s and now no wifi networks are showing up when I turn the wifi on.

    I tried resetting my networks and turning my phone on and off with the wifi turned on, but neither of it worked. I don't know what to do and I really need wifi on my phone for tomorrow.

    Did Apple install the new screen?  Or an Authorized Apple Service Provider?  If so, you should return to the location that replaced your screen to see if they didn't hook something up properly.
    If it wasn't an Authorized Apple Service Provider, or an Apple Retail store, You should take it back to them and discuss it with them.  In this case, Apple will likely not offer any replacement service as it was opened by an unauthorized third party.

  • My IPhone 5 will not turn on, I had a new screen I stalled, all working great, the next day I was flying so turn off the phone and since trying to turn back in again,,, I receive many lines of white text stating incorrect shutdown please help

    hhello, please help if you can,,,
    i had a new screen installed, everything working fine, as was using the phone, the next day I was flying so turn off the phone in the usual way...
    oon arrival turned the phone on, received a slow acting black background with the apple sign visual, but never moved from that......... So tried a reset still the same just left looking at the apple sing in the middle if the screen,makes it there for 5 mins but still never turn on completely,,,,,
    again I tried,,,,,, again I tried a reset, then started to received lines of white writing, about 4-5 lines slowly like it was being typed, which stateed INCORRECT SHUTDOWN, ????????? then took out my MacBook air, to connect to ITunes to see whaypt I could do,
    i tunes did not find the phone as would normally so opened ITunes manually, still did not find the Iphone,,,,,
    Any Ideas please, as it is useless stuck in the drawer, I am an apple user, an quite knowledgable having other Iphine 5, IPad air and Mac,,,,, I am stuck,,,,
    PLease Help,my hank you in advance

    SharmFarm wrote:
    Good ev Ning Mario49    firstly I would like to say a great thank you for your attention to trying to help me,,,,,    i have looked at the links and will try everything stated first thing…
    Hi Mario,,,,
    I tried everything in your reply,,, thank you again,, I had done that once before and all was working great,,
    I have just now tried the Reinstall via iTunes, about 20 into the download, the iTunes logo on the phone disappeared, and the Apple Logo appeared again,,, I waited until the iTunes stated that the download had finished, and the install was in progress,,,
    Nothing happened, still the Apple Logo was visual on the screen, iTunes never recognised the phone which it was on my iTunes account previously,,,
    Still just a bunch of lines, maybe 5 or 6 so small writing,, I personally can not read what it is telling me, someone said it reads, incorrect shutdown,,,????????
    Please advise,???
    I am now at a loss,,, I really became excited when I saw the iTunes icon after putting the phone into restore,,,???
    Thank you again
    D

  • I was trying to make a new screen recording using quicktimeplay, but when I watched the video after recording it all I could hear was me talking while the video was showing on the screen. How do I turn off that recording and turn the right one on? thanks

    I was trying to make a new screen recording using quicktimeplay, but when I watched the video after recording it all I could hear was me talking while the video was showing on the screen. How do I turn off that recording and turn the right one on? thanks

    Hi j2399123,
    It sounds like your screen recording is doing what it was designed to do, capture what is happening on your screen, with optional voice over with the microphone.
    Screen recording is for recording what you see on the screen, it is not a "video capture" option, like for capturing a movie with sound that is playing on your screen.
    For the QuickTime recording options, check out "Recording with QuickTime Player" in
    Mac Basics: QuickTime Player creates, plays, edits, and shares video and audio files
    http://support.apple.com/kb/ht4024
    And for screen recording specifically, there's
    QuickTime Player 10.x: Record your computer’s screen
    http://support.apple.com/kb/PH5882
    Thank you for thinking of Apple Support Communities for your support needs.
    Nubz

  • My ipod touch 5 is frozen on the lockscreen and i cant do anything except restart it and that doesnt hekp. will getting a new screen help? or is there another, less exspensive way? also, it is not connected to wifi.

    I need to fix my ipod and i don't know how, i am hoping that if i leave it alone over night that it will fix itself,
    its on the lock screen and i cant do anything with the screen, i tried restarting it and it didnt work, so because i restarted it, it is not connected to wifi.
    please help.
    will getting a new screen help? or is there an easier, less expensive way?

    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable                                                       
    - Try on another computer                                                       
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
      Apple Retail Store - Genius Bar              

  • My iphone 5 has a black screen keeps vibrating when goes on charger i think lcd is broke and screen will me getting a new screen fix it everytime i plug it to the computer mu picture  and music pops up and ny new screen is coming tomorrow

    my iphone 5 is making me cry everytime i put it on the charger it vibrates like every 2 seconds my phone isnt water damaged so i dont have to worry about that and when i plug it to the computer itunes recognizes my phone i think the lcd is broken so i went and orderd a new screen from amazon do you think it would work if i place a new screen on it HELLLLLLLLLLLLLLLLLLLLLLLPPPPPPP PLEASE

    **called applecare.
    Did the tests and they ended uo recommending i go to the apple store..
    Not sure if it was a soft/hardware prob but they replaced my phone
    fo free

  • How do I get my widgets to come up on my desktop not on a new screen

    how do I get my widgets to come up on my desktop not another screen

    System preferences > mission control > uncheck "show dashboard on a new screen"

  • How can I create a new screen to upload an attachment in SRM?

    Hi everyone,
    I need to create a new screen that will upload a new attachment in a BID.
    I already know how to create the screen and ITS.
    According the standard screen 0100 in program SAPLBBP_PDH_TEXT, I need an applet called "CFILESAPP" and then use this to upload to the abap program.
    This is everything i know.
    Does anybody knows anything else?
    thanks,
    Oscar.

    Hello MotionBoy,
    There are two ways to go about creating a new thread to run a step.  The first is to create a new sequence, into which you put the LabVIEW step you want to run and any other steps that may go along with it.  Then use a sequence call step to call this newly created sequence.  Set the Execution Options of the Sequence call step to 'Use New Thread.'  This will allow you to run a set of steps in a new thread, not just a VI.  The second method, which is only available for a LabVIEW VI, is to use the “Run VI Asynchronously” step.  This can be accessed if you right-click within your sequence and select Insert Step » LabVIEW Utility » Run VI Asynchronously.  This step will allow you to call a VI and have it automatically open in a new thread.  You can further customize this step by opening the configuration menu in the Step Settings.
    To address the current behavior of your steps I would like to know if the modules in steps 1 & 2 pass data between them or it would be desirable for them to do so?  If so you are going to need a more complex synchronization structure such as TestStand/LabVIEW queues. There is a simple example you may want to look at in the TestStand examples, under the Synchronization folder that demonstrates how to use queues. Otherwise the above solution should be all you need.
    John B.
    Applications Engineer
    National Instruments

  • How to get selected rows in a new screen in alv.

    Hi everybody,
    I have a alv report in oops concept when i select a row all the details of that particular row should come in new screen.
    can anybody help me regarding this if possible with example.
    thanks in advance.
    regards,
    venu.

    Hi,
    Check this.
    select several rows in alv
    It will be helpful.
    Regards,
    J.Jayanthi

  • Ipod touch 4th gen needed a new screen and sleep/wake switch.  So, I replace them.  I was able to get to settings and do "erase all content and settings".  I am not able to totally shut this device off as it keeps restarting after a few seconds.

    Ipod touch 4th gen needed a new screen and sleep/wake switch.  So, I replace them.  I was able to get to settings and do "erase all content and settings".  I am not able to totally shut this device off as it keeps restarting after a few seconds.  I have used itunes to restore and also recover.  Device will actually shut off and stay shut off if I leave it connected to the computer.  The moment I unplug (3 seconds) the apple logo appears, it boots, unlock screen appears, I can unlock and operate normally, unplugged or not.  Just cant get it to completely shut down unplugged.  Any thoughts?

    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer                            
      - If still not successful that usually indicates a hardware problem. Maybe you installed a bad component or damaged something during the repair/replacement.
    Apple will not help since you worked on the iPod yourself.

  • IMR7 : Creation of a new Screen Variant does not save Layout

    Hello,
    In IMR7, if I create a new screen Variant with a modified the default Layout field, the next time I log-in to SAP, system does not recognize my Layout selection.
    Do you have a suggestion?
    Thanks
    François

    Hello,
    Thanks for your support but it did not resolved my problem.
    When I save Layout I  have three fields:
    -Layout name
    -User-specific checkbox
    -Description
    Even though User-specific is not checked, next time I relog to SAP and choose my Variant, the layout I have chosen in this variant is not keeped in memory. A layout named 4_SAP_IM is always displayed.
    Do you have the same behavior?
    Thanks
    François

  • Function of HOLD DATA in the settings for creation of a new screen.

    Hi,
    Since i'm new to ABAP and still learning my way through, i would really appreciate if somebody can help me out with the exact functioning of selecting the check box 'HOLD DATA' under the settings option while creation of a new screen.
    Thanks for any help extended.

    Take simple scenario of SE38. The Screen for the transaction has the Flag "HOLD DATA" as Ticked.
    Now enter some program name on the field and Click - Utilities-> User Profile -> Hold data.
    Now come out of the transaction, go back to the same transaction. The name of the Program that you entered earlier will appear on the input field.
    So if the screen doesn't have "Hold Data" set the functions of HOLD data, SET DATA, DELETE data will not work.
    Also try using SET DATA For the Program input field.
    SAP Help :
    If you activate this option, the following functions are supported for the screen at runtime:
    System -> User profile -> Hold data
    -> Set data
    -> Delete data
    The Hold data function allows you to hold onto any entries you have made on the screen. When the screen is next processed (even in a different mode), the system then automatically redisplays the data in the input fields.
    If the option is not activated, these functions are ineffective at screen runtime.

Maybe you are looking for