Problem with HTML tags in AS

Problem with HTML tags in AS

Post by bknowlden0 » Tue, 11 Jan 2005 02:02:19


I am trying to set up a link via actionscript. ? in the first frame of the
movie I have: myTextField.html = true; ? my text field is set to dynamic,
single line, with an instance name of 'myTextField' with no Var name set ? I
have a button with the following script: on (press) { box1.text = <a
href=' http://www.yqcomputer.com/ ' target='_blank'>recent work</a>; } Everything is
seemingly fine, but when I test the script, the output panel tells me 'the '='
must be terminated by an operand' ??? Any help?
 
 
 

Problem with HTML tags in AS

Post by christophe » Tue, 11 Jan 2005 02:21:43

Hi,

use box1.htmlText instead of box1.text

regards,
Christophe - http://www.yqcomputer.com/

 
 
 

Problem with HTML tags in AS

Post by bknowlden0 » Tue, 11 Jan 2005 02:35:37

I tried that as well after your comment and another forum string that discussed
a similar problem, heres what I have now and am still receiving the error: 'the
operator '=' must be terminated by an operand' box1.text = 'string';
box1.html = true; box1.htmlText = <a href=' http://www.yqcomputer.com/ '
target='_blank'>recent work</a>; **these three lines of code are in the first
frame of the movie, with the same single line dynamic text box with the
instance name of box1
 
 
 

Problem with HTML tags in AS

Post by bknowlden0 » Tue, 11 Jan 2005 02:39:22

...sorry, the code is being processed on this forum, here is how it looks in
flash:

box1.text = "string";
box1.html = true;
box1.htmlText = <a href=" http://www.yqcomputer.com/ " target="_blank">recent work</a>;
 
 
 

Problem with HTML tags in AS

Post by bknowlden0 » Tue, 11 Jan 2005 02:39:39

...sorry, the code is being processed on this forum, here is how it looks in
flash:

box1.text = "string";
box1.html = true;
box1.htmlText = <a href=" http://www.yqcomputer.com/ " target="_blank">recent work</a>;
 
 
 

Problem with HTML tags in AS

Post by christophe » Tue, 11 Jan 2005 03:06:54

Hi,

please note the quotes (') around the html tags.

So start with double quotes ('), and use single quotes (') in your string.



box1.htmlText = "<a href=' http://www.yqcomputer.com/ '>my link</a>";
 
 
 

Problem with HTML tags in AS

Post by bknowlden0 » Tue, 11 Jan 2005 03:11:35

I tried that also, when I place double quotes, not only does the '//' after http comment out the rest of the line, but the output panel reads this as a syntax error?
 
 
 

Problem with HTML tags in AS

Post by bknowlden0 » Tue, 11 Jan 2005 03:14:20

WAIT!!!

single quotes inside the string!

If I was the committee for Nobel Peace Prize I would nominate you because you prevented me from *** ing my machine!!!

thx