Forum Moderators: open

Message Too Old, No Replies

How to embed and HTML site into Flash

HTML in Flash

         

fleedoggy

5:32 pm on May 12, 2005 (gmt 0)

10+ Year Member



I have seen some comments about it and other people ask, but I have not yet seen a solution. However I'm sure it's out there. In one of the Flash sites I am working on there is a button to an Adam Drake video that instead of being a button which links to a blank page, "nt2demo.html"(how it is currently setup), I want to have it were the page "nt2demo.html" is actually being displayed in the current Flash site. Is there a way to do this, that is embed an HTML site in Flash? In a sense it would be similare to "IFrame" in HTML. I dont need to actually put html in flash, I know it supports basic style codes, but I want it to get the url and display it in a section of the flash? Please help if possible. Sorry for this being so long.
<snip>
Thanks again,
Jerry

[edited by: engine at 11:49 am (utc) on May 13, 2005]
[edit reason] See TOS [webmasterworld.com] [/edit]

BlobFisk

12:00 pm on May 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The easiest way to do this would be to load the page into an iFrame...

You can load HTML in Dynamic and Input Text fields which may be an option...

too much information

12:21 pm on May 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you are using Flash 7, you can use an XML feed to load data dynamically into your flash movie. (I'm still learning so I can't explain how, I just know it is possible) Then you can parse the XML within Flash (using actionscript) to handle whatever you needed it to do.

I believe you can also load movie files dynamically, so you could create links in your movie that would pull the external movie from where ever it is stored.

Keep in mind that Flash will not pull data from an external domain unless that domain contains a crossdomain.xml file that lists your domain. It is part of Flash's security features.

rocknbil

4:11 pm on May 24, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Jerry - Off topic, but I am probably the only other member here besides yourself that knows who Adam Drake and an NT are. Woot! :-)

Anyway does this have to load dynamically or are you hard-coding? Can you just do a screen cap of the page in question and import that into your Flash?

Lynque

4:17 am on May 25, 2005 (gmt 0)

10+ Year Member



Jerry,

I'm pretty sure you can use the built-in scrollpane component in more recent versions of flash (MX, MX 2004) and load html pages in it.

The scrollpane, for all intensive purposes acts like an Iframe so you can load .swf's, .html or any other type of document (I've never tried server side dynamic docs but can't see why it wouldn't work).

Let us know how you make out...

fleedoggy

6:44 pm on May 26, 2005 (gmt 0)

10+ Year Member



Thanks for help and advice guys. I endedup just being satisfied with the icon i put with a link sourcing to the swf on my server.

mikko

1:56 pm on May 30, 2005 (gmt 0)

10+ Year Member



HI, i have been trying to do something similar for about a week or so. The aim was to have a deignated area that would show html content. Using Flash MX Professional 2004 i found an example in the following local location:

C:\Program Files\Macromedia\Flash MX 2004\Samples\TextEnhancements

however this is very restricted and does not pick up any html page, only certain tags.

I decompiled a product cd created in flash that picks up real html pages and inserts them into Flash, the code seems to be generated using software from Flashstudio and looks like this:

_global.OpenHTMLWindow = function ()
{
id = "0"
xPosition = "249"
yPosition = "126"
width = "531"
height = "371"
url = _root.executablepath + "main.htm"
getURL("FSCommand:flashstudio.browser_load","id,xPosition,yPosition,width,height, url")
AutoSizeHTMLWindow()
myListener = new Object ()
myListener.onResize = function ()
{
AutoSizeHTMLWindow ()
}
stage.addListener(myListener)
}
_global.AutoSizeHTMLWindow = function ()
{
xPosition = 249
yPosition = 126
width = 531
height = 371
xPosition = Math.ceil(xPosition + (Stage.width - 800)/2)
yPosition = Math.floor(yPosition + (Stage.height - 600)/2)
xPosition = String(xPosition)
yPosition = String(yPosition)
width = String(width)
height = String(height)
id = "0"
getURL("FSCommand:flashstudio.browser_size","id,xPosition,yPosition,width,height")
}

however so far i cannot get this to work. If anyone else has managed this please let me know.