# Any way to load in complete html?

**URL:** <https://forum.kirupa.com/t/any-way-to-load-in-complete-html/63713>\
**Category:** Uncategorized\
**Created:** [September 9, 2004, 12:03pm UTC](https://forum.kirupa.com/t/any-way-to-load-in-complete-html/63713 "2004-09-09T12:03:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RedSox](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@RedSox](https://forum.kirupa.com/u/RedSox)\
**Post date:** [September 9, 2004, 12:03pm UTC](https://forum.kirupa.com/t/any-way-to-load-in-complete-html/63713/1 "2004-09-09T12:03:12Z")

</div>

Is there any workaround to load in complete html pages with LoadVars ?

I have this client that wants to update some pages (just adding and removing text and pictures), but I would love to do it in action scripting and have him update an external file.

Now I could tell him to remove the tags from \<html\> to \<body\> and from \</body\> to \</html\>, save it as text file and add a variable (like myText=) at the top of his file, but that wouldn’t make things much easier for him.

He’ll probably start to complain that it would have been easier if I’d made it in html instead of flash 🙂

Does anyone have any other ideas on how to display an html page inside of flash ? (except for opening browser windows and loading the page in that window ofcourse - that isn’t good enough)

Thanks! 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 9, 2004, 2:04pm UTC](https://forum.kirupa.com/t/any-way-to-load-in-complete-html/63713/2 "2004-09-09T14:04:13Z")

</div>

ideea  
Let’s say you put a &outsidevar= in the very beggining of your html file, even in front of your \<html\> tag  
Load it with Loadvars object (i don’t know how to work with it :(… but i’ll promise I’ll learn some day 🙂 ) then you can put this:

```auto
stripedvar = outsidevar.substring(outsidevar.indexOf("<body>"),outsidevar.lastIndexOf("</body>"));

```

This will you’ll have in your stripedvar variable only the text between the \<body\> and \</body\>

Does it help ;)?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 10, 2004, 9:10am UTC](https://forum.kirupa.com/t/any-way-to-load-in-complete-html/63713/3 "2004-09-10T09:10:23Z")

</div>

I can tell you all about LoadVars, but I never seen that technique you shown before…really cool stuff ! Thanks 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 10, 2004, 10:05am UTC](https://forum.kirupa.com/t/any-way-to-load-in-complete-html/63713/4 "2004-09-10T10:05:54Z")

</div>

Glad you like it… but i realized it doesn’t work as you wanted… 😃  
one thing i didn’t noticed first… is that the code above will return a string starting from \<body anyproperties\> and soo on.  
It starts cutting in front of the body.

Solutions.  
1- you can add an integger to indexOf("\<body");  
2- you can put the whole string from \<body to the end closing tag of body \> including properties or classes.  
3- you could add a comment into your html and search for that rather than the \<body\> tags

Anyway… that “technique” has nothing to do with LoadVars. It’s rather a string technique ;).

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 10, 2004, 4:08pm UTC](https://forum.kirupa.com/t/any-way-to-load-in-complete-html/63713/5 "2004-09-10T16:08:12Z")

</div>

Silly me…just replace the ‘but’ with ‘and’ 😉

Yeah, I could strip it from the index of \<body\> plus the length of \<body\> all the way to the index of \</body\>. (or -1 )

Well, something like that for sure - thanks again! I’ll have a look at it & post my results here 🙂
