Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8159701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:00:37+00:00 2026-06-06T18:00:37+00:00

I’ve been trying to render a webpage using the Adobe Flex / Flash builder

  • 0

I’ve been trying to render a webpage using the Adobe Flex / Flash builder StageWebView but it’s not scaling the webpage to fit the phones screen dimension and basically cutting the right side of the webpage off. I’ve tried using

<meta name="viewPort" content="width=device-width; initial-scale=1.0;
            maximum-scale=1.0; user-scalable=no;" />

This has not worked. Below is the Flex code I’m currently using.

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

<fx:Script>
    <![CDATA[
        import flash.media.StageWebView;
        import flash.net.URLRequest;
        import spark.events.ViewNavigatorEvent;

        protected var webView:StageWebView = new StageWebView();
        protected var openBrowser:Boolean = false; 


        protected function view1_viewActivateHandler(event:ViewNavigatorEvent):void
        {
            if (StageWebView.isSupported)
            {
                currentState = "normal";
                webView.stage = stage;
                webView.viewPort = new Rectangle(0,75,stage.stageWidth,stage.stageHeight);
                webView.addEventListener(LocationChangeEvent.LOCATION_CHANGE,onURLChange);    
                webView.loadURL("http://nealdrake.com/mls.html");    
                addEventListener(ViewNavigatorEvent.REMOVING,onRemove);
            }
            else {
                currentState = "unsupported";
                lblSupport.text = "StageWebView feature not supported";
            }    
        }

        protected function onURLChange(event:LocationChangeEvent):void
        {
            trace("URL change");
            // Uncomment the following line to load in the default browser instead... 
            //navigateToURL(new URLRequest(event.location));
        }

        protected function onRemove(event:ViewNavigatorEvent):void
        {
            this.webView.dispose();
        }
    ]]>
</fx:Script>

<s:states>
    <s:State name="normal"/>
    <s:State name="unsupported"/>
</s:states>

<s:Label id="lblSupport" includeIn="unsupported" width="95%" horizontalCenter="0" verticalCenter="0"/>

Any help would greatly be appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T18:00:40+00:00Added an answer on June 6, 2026 at 6:00 pm

    I’m surprised it’s cutting off the right hand side rather than the bottom, since that’s what I’d expect from this:

    webView.viewPort = new Rectangle(0,75,stage.stageWidth,stage.stageHeight);

    You need to count for any X or Y offset in your width and height, like this:

    webView.viewPort = new Rectangle(0,75,stage.stageWidth,stage.stageHeight - 75);

    It might be that your StageWebView is being initialised before your app’s size is correct. Try adding a resize handler (listen for Event.RESIZE events on whatever component your code above is taken from) that sets the viewport again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to render a haml file in a javascript response like so:
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.