Solved

Flash-add image to html textfield with hyperlink

Posted on 2008-10-06
5
412 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
[X]
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
  • 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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

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…
When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

696 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