Solved

Flash-add image to html textfield with hyperlink

Posted on 2008-10-06
5
408 Views
Last Modified: 2013-11-12
Does anyone know (if at all possible) how to add an image to a HTML enabled dynamic text field in Flash (AS2) and successfully assign a hypertext link to it?

I'm currently using the code below which does load in the image and I do get the pointing hand tool as I roll over the image but the hyperlink doesn't work?

<a href="http://maps.google.com/" target="_blank"><img src="googlemap.jpg"></a>

Thanks,

Mark
0
Comment
Question by:crooksy88
  • 3
  • 2
5 Comments
 
LVL 39

Expert Comment

by:blue-genie
ID: 22666602
how are you doing it assigning it to the textfield?

this works.

blah.htmlText = "<a href=\"http://maps.google.com\" target=\"_blank\"><img src = \"1_p1.jpg\"><a>";
0
 
LVL 13

Author Comment

by:crooksy88
ID: 22666969
Hi blue-genie,

You are correct, that does work.

I've now discovered that it works for me too when used on it's own, however, if I add anything before the <a href= , the link becomes partially disabled, as if being covered by something.

e.g.

blah.htmlText = "Hello World <a href=\"http://maps.google.com\" target=\"_blank\"><img src = \"1_p1.jpg\"><a>";

If your 1_1p1.jpg is, say 200px high, clicking on the top of the image does nothing, but clicking on the bottom half works.

Have you any idea why this might be happening?

Thanks,

Mark

0
 
LVL 39

Accepted Solution

by:
blue-genie earned 500 total points
ID: 22667322
your problem with the hello world part is because you'r breaking the string

so "Hello World " + <a href etc should work.
can't replicate the issue with the top half bottom half?

upload your file? if it aint too big?
0
 
LVL 13

Author Comment

by:crooksy88
ID: 22667527
I'm pulling this info in from an xml file

<?xml version="1.0" encoding="UTF-8"?>
<content>
<article><![CDATA[Hello World <a href="http://www.google.com" target="_blank"><img src="ldn/images/news/1.jpg"></a>]]></article>
</content>
0
 
LVL 13

Author Closing Comment

by:crooksy88
ID: 31503711
Thanks for your help on this.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question