Solved

Flash-add image to html textfield with hyperlink

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
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 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…

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now