Title: Embed HTML to render a simple browser inside swf with StageWebView
Tags: actionscript-3;flash
Question: I found a way to do this and it works when tested in Flash (Control+Enter).
But when I export movie clip as swf, the file size is only 2k and doesn't open with Acrobat Reader. This seems to be the best way for me, because then I want to insert the swf in a pdf file. My final intention is basically to have both a youtube playlist and a Facebook comment box embeded inside the pdf.

I'm using Flash CS6 and pasted this code:

```import flash.display.MovieClip;
import flash.media.StageWebView;
import flash.geom.Rectangle;
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;
import flash.desktop.NativeApplication;

//This will return the actual width value of our stage
var wView:int = stage.stageWidth;
//This will return the actual height value of our stage
var hView:int = stage.stageHeight;

//Create a new StageWebView object
var swv:StageWebView = new StageWebView();
//Set the size of StageWebView object created to match the screen size
swv.viewPort = new Rectangle(0,0,wView,hView);

//Load the Google Page
swv.loadURL("https://www.google.com/");
//Show the StageWebView Object
//If you want to hide it, set the stage property to null
swv.stage = this.stage;
```

Comment: StageWebView is only available for AIR runtime.

Comment: ooh... but will I be able to bring it into a pdf though?



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 2, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2014:00:08/22/14', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<actionscript-3><flash>', 'Title': 'Embed HTML to render a simple browser inside swf with StageWebView', 'ViewCount': 500, 'id': 25453422, 'user_AboutMe': '<p>We are missionaries in one of the poorest areas of South America, working on a web app. In the meantime you can get to know us here: <a href="https://www.facebook.com/granjasolidaria/" rel="nofollow noreferrer">https://www.facebook.com/granjasolidaria/</a></p>\n', 'user_AccountId': 3321997.0, 'user_DisplayName': 'BibleFarm.org', 'user_Reputation': 75.0, 'user_Views': 19.0, 'user_id': 2792945.0}}