Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Flash-add image to html textfield with hyperlink

Posted on 2008-10-06
5
409 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
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 goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

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