Skip to main content
Participating Frequently
November 5, 2010
Answered

Is there a way to make as3 execute an <A Href>I html code?

  • November 5, 2010
  • 1 reply
  • 459 views

I have been trying to figure this out for awhile now. The billing company I am forced to go through sucks and this is the only button codes they will supply:

<A HREF="http://www.lexiefyfe.com/ccbill9001/index.htm"><img src="ccbutton.jpg"></A>

Im not not sure how to tweak the code or if as3 can actually execute this. Every time I try to change things all I get is url not found... Im not sure about the img src= bit but Im asuming that is the button Im supposed to be using? I want to make my own buttons in flash. The files I am trying to pull up are in the same folder on the server as my flash files. Its set up like an html site would be (not my doing). As always, any consideration or help is greatly appreciated.

Thanks all

Thomas

This topic has been closed for replies.
Correct answer Ned Murphy

If you create a dynamic textfield (named tf below) and assign that text (slightly altered with slashes as shown) to its htmlText property, that link should work so long as the image is in the same directory as the file you are testing (save the file before testing)...

tf.htmlText = "<A HREF=\"http://www.lexiefyfe.com/ccbill9001/index.htm\"><img src=\"ccbutton.jpg\"></A>";

1 reply

Ned Murphy
Ned MurphyCorrect answer
Legend
November 5, 2010

If you create a dynamic textfield (named tf below) and assign that text (slightly altered with slashes as shown) to its htmlText property, that link should work so long as the image is in the same directory as the file you are testing (save the file before testing)...

tf.htmlText = "<A HREF=\"http://www.lexiefyfe.com/ccbill9001/index.htm\"><img src=\"ccbutton.jpg\"></A>";

wstcstkdAuthor
Participating Frequently
November 5, 2010

Would it be a bad idea to make a button with no function just for the effect and put the dynamic text (ccbill) over the button? Or can you put the Dynamic text (ccbill) on the roll over and down states of a button that has no function?

Thanks again!

Thomas

Ned Murphy
Legend
November 5, 2010

I am not sure of your intent, but placing the text over a photo would be a better option.  It is not yet clear to me what your true intentions are because you seem stuck on using the html code. If you want to make an object link to that web address, and do not need to use that exact code (you shouldn't need to) then you can assign an event listener to an object and make it open that url.