• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 474
  • Last Modified:

Want to do Popups using text taken from XML file.

Hello,

I am currently reading the content of an XML file to populate a Textfield in Flash.
However, I would like to be able to add mouseover/mouseclick popup actions to selected/highlighted text .

While general html works, i dont think Div popup works. The following code inserted into my xml text doesnt not work :

<div id="simplediv" style="background-color:yellow;border:1px solid black;display:none;width:200px;height:200px;">Click anywhere in the document to auto-close me</div>
<a href="#" onclick="Popup.show('simplediv');return false;">Click Here To Show DIV</a>

My other option maybe is to create the popups using MovieClips. However, I would still need to know that my mouse is hovering on a specific text for me to call it.
Any ideas/pointers I can set myself off to?
0
NeverEndingFlashStories
Asked:
NeverEndingFlashStories
  • 2
  • 2
1 Solution
 
dgofmanCommented:
For what Zone and Language this question?
0
 
CarnouCommented:
I'm a little out of my depth here; I'm not an expert at HTML and divs and such.
So, I'm stuck simply giving you a reference page: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/text/TextField.html#htmlText

This tells what html is supported.  <div> is not.  Also, Popup is presumably Java or javascript, so is also not necessarily accessible to Flash's html.text setting.

The good news is that this reference also gives you a way to go about it.  Use an event anchor instead of an href, and catch the event inside your action script.
It also makes some mention that you can define hover styles for the anchor using CSS (of which I'm also blissfully ignorant).

Hope this helps.  I can make an event anchor example for you, if you want me to go further down that route.
0
 
dgofmanCommented:
Actually in AS we arenot supporting div and span, but you can open popup using <a href tag and call javascript
0
 
NeverEndingFlashStoriesAuthor Commented:
It worked flawlessly :) Thanks so much, and I will now have to also see what to do about the hover styles. But maybe I will tag a hover thing right on the event listener. Cheers ^_^
0
 
NeverEndingFlashStoriesAuthor Commented:
Thanks!!!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now