Skip to main content
August 11, 2010
Answered

Embedding HTML Into Flash?

  • August 11, 2010
  • 2 replies
  • 23179 views

Let me start with the fact I only know some AS2. AS3 tends to go over my head. So I'm using Flash 8

If I need FlashCS5 to do this, then, PLEASE, let me know.

Here's the situration.

I manage and build a number of sites. Many are parts of a network. The goal is to join them all as one. Both without using php (don't know php), and without having to leave primary page. A Flash Site is the plan. But that is a TON of work to re-create entire sites flash that are already large and established.

So I got to thinking. What if I embed the HTML/CSS sites into Flash itself? That way they can still make their changes and it'll effect both the HTML version as well as it's mirror/portal via the Flash site?

In Short:

I want to embed this page on one frame in Flash:

http://www.uga-international.com/About.html

And place a link to another KeyFrame that has this page/site embeded:

http://www.melholder.com/MAIN.html

How would I go about doing this?

====

Then it got me thinking even more. If this works, would it be possible to load a SWF video player (Webstunning FLV Player) into Flash and run it as if it's part of the Flash site?

I thought the Loader Component would do this for me. But it keeps saying it can't locate the "playList.xml" file. The player has outside files it referances. This eoor prevent the player.swf from playing period.

So how would I go about getting the loader to player external .SWF files that referance external .XML files?

Here are two sample pages using different .SWF files that referance external .XML files:

http://www.melholder.com/index.html

http://www.dovm.org/TEST1a/Test1a.html

Thanks in advance.

    This topic has been closed for replies.
    Correct answer kglad

    woot! I had it in my head that worked only with old school framesets.

    Just tried it and it works great.

    Another piece of knowledge gained by way of kglad!

    Thanks bro...

    as example:

    a flash function:

    function goToUrl():void

    {

        navigateToURL(new URLRequest("http://www.example.com"), "myIFrame");

    }

    or for your AS2 version:

    on (release) {
         getURL("URL Link Goes Here","myIFrame");

    }

    and the iframe bit in html:

    <iframe id="myIFrame" width="800" height="600">

    </iframe>


    you're welcome.

    p.s.  please mark this thread as answered, if you can.

    2 replies

    June 17, 2014

    Hi guys its pretty cool, Finally i found a very good method of loading html content URL inside Flash. Try with any Jquery API i have used bPopup.js.

    From flash pass any URL to this js method and embed all the required Jquery API's:

    <script src="assets/jquery.bpopup-0.9.4.min.js"></script>

    <script src="assets/jquery.easing.1.3.js"></script>

    <script src="assets/scripting.min.js"></script>

    <script language="javascript">

          function openModalWindow(url)

       { 

           document.getElementById("popup2").innerHTML = "<iframe id='myIFrame' src='" + url + "'frameborder='0'></iframe>";

           $('#popup2').bPopup();

       }

      </script>

    June 17, 2014

    If any one required the full source code i can provide demo sample.

    leapinglamb
    Participant
    July 10, 2014

    I would love to see your sample!

    kglad
    Community Expert
    Community Expert
    August 11, 2010

    flash textfields have a very limited number of html tags they can parse.  you're not likely to find an html page, that will display as you expect, in flash.

    August 11, 2010

    Thanks for the input. But any info/tutorial concerning it would help a great deal.

    I'm mostly interested in importing external SWF files the referance outside files. like the samples i provided.

    kglad
    Community Expert
    Community Expert
    August 12, 2010

    loaded files are generally relative to the main swf's embedding html location.  so, if you have a swf that's in some directory and it loads an xml file without problem but you then load that swf into another swf that's in a different directory (ie, the two swfs are in different directories), the loaded swf needs to have the path to the xml file changed.