Meesha74
12-27-2010, 01:36 PM
I am really, really new to actionscripts but I am trying the following:
I want to embed a simple HTML page into a flash project. So I use a dynamic textfield with an action script that embeds the html page. All the text of the HTML page is visible, but the image that is in the HTML page is not.
This is the action script code that I use in Flash:
var LoadVarsText = new LoadVars();LoadVarsText.load("tekst.html");
LoadVarsText.onLoad = function(success) { if (success){ trace ("done loading");
scroller.html = true;scroller.htmlText = this.var1; }else{ trace ("not loaded"); } }
This is the HTML page (named: tekst.html)
var1=
<html>
This is the text for the textfield<BR>
<IMG SRC="google.jpg">
</HTML>
The google.jpg file is in the same directory as the flash movie, as is the HTML file. When I open the HTML file in my browser the image is visible. As I understand flash is able to recognize simple HTML tags, including the <IMG> tag. What am I doing wrong?
I want to embed a simple HTML page into a flash project. So I use a dynamic textfield with an action script that embeds the html page. All the text of the HTML page is visible, but the image that is in the HTML page is not.
This is the action script code that I use in Flash:
var LoadVarsText = new LoadVars();LoadVarsText.load("tekst.html");
LoadVarsText.onLoad = function(success) { if (success){ trace ("done loading");
scroller.html = true;scroller.htmlText = this.var1; }else{ trace ("not loaded"); } }
This is the HTML page (named: tekst.html)
var1=
<html>
This is the text for the textfield<BR>
<IMG SRC="google.jpg">
</HTML>
The google.jpg file is in the same directory as the flash movie, as is the HTML file. When I open the HTML file in my browser the image is visible. As I understand flash is able to recognize simple HTML tags, including the <IMG> tag. What am I doing wrong?