?
Solved

Flash-add image to html textfield with hyperlink

Posted on 2008-10-06
5
Medium Priority
?
416 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 2000 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

762 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