[F8] How Do I Insert "href" Anchor Tags?
Hi, forum.
I know there is probably a simple answer to this. I'm new to flash and working on my first project so excuse me.
I'm trying to insert a "<a href" tagged image into a text field on my project so that when Online, it gets the image from an external source
FlashKit > Flash Help > Flash Newbies
Posted on: 08-30-2007, 06:10 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
FlashVars And HREF Tags
I've been going around and around with this, but I can't get it to work.
In essence, I have a dynamic text box that I want to show the navigation "bread crumb" for a website. The text box is set up to display whatever I set to the variable theCrumbText. The textbox is also setup to display HTML content.
I'm using FlashVars (as a parameter and in the embed tag) to set theCrumbText variable. When I use:
Code:
FlashVars="theCrumbText=<b>home</b> // secondary page"
Everything works fine. The text "home" is bold. But as soon as I add a link...
Code:
FlashVars="theCrumbText=<a href=index.php><b>home</b></a> // secondary page"
Nothing shows up! It's as if something in the link is not allowing flash to set the variable. What gives? Am I stupid, or just so tired that I'm overlooking something incredibly obvious?
PROBLEMS LOADING .txt WITH HREF TAGS
I have 4 movieclips with 3 dynamic textfields in each.
There is a separate textfile for each movieclip.
I have the textfiles being pulled into the right targets -- but I can't get the URLs to work. Only 2 of my href tags work...the others just display the full <a href="urlhere">Click</a> instead of just the word with link.
What am I doing wrong?
A Href Tags In CSS, Can I Grab This As An Event?
Hello friends,
I have a puzzle, I'm using a CSS style sheet to make the layout of a website in flash: AS2; but I'm not sure how I can go about tracking which links someone clicks on inside of the textFields.
Specifically, I need to hear the event when someone clicks a link within the textField [an <a href=""></a> tag set by a style sheet [CSS file] and loaded via XML].
The event needs to then be passed to my Controller Class which then will broadcast the event to my Stats Class file [to record activity] and open a window with preset parameters....
Anyone know how I can capture this event? Thanks!
seb.
Long Href Tags Being Truncated
I am working on a project that is loading its data from an xml file. All the href tags work fine, except for the ones that are really long and have a javascript function attached to it. It seems that the link is getting truncated at 128 characters.
Is there a solution to this problem?
Thanks.
<a Href> Tags That Invoke AS Function
hi everyone,
i need your help on how to call a actionscript function using <a href> tag....is this possible?
i have an example link here http://www.kirupa.com/web/xml/examples/searchbestof.htm
this is supposed to be what i want but i need to load an AS function or load it within flash not URL..
any idea would greatly appreciated...
please help me....
thanks
External Txt File. How Do I Insert A Telltarget Action Or A Href Tag ? Please
i was wonder, i have an external text file. thing is i want to be able to make certain words in this text file links.
How do i go about this ? or do i have to select HTML from the text Options ? and insert all the html (what a drag) ? maybe theirs an easier way ?
maybe their is a tutorial on this site. but i proberly missed it, bad on my part.
thanks in advance tho!
Href Links Below Swf In Div Tags For Search Engines
Hi,
At the moment it still seems to be a big issue with search engines indexing within a .swf and seeing the content (text) and links . Though this does seem to be changing.
Two questions:
1. Even if some search engines can or are attempting to index into .swf files. Can/do they index and check content within .swfs that have been loaded with loadMovie??? Seems unlikely.
2. With a site that can be broken down into a number of definit sections does it make sense to do the following.
Within the html that each .swf is embedded in place first thing in the <body> tag a text of the content that is within the .swf and all the hrefs that you can ... at least to the main section htmls ...
and any external links within the .swf. Then place your .swf file within <div> tags.???
The text and hrefs are hidden by the .swf file in the div tags.
I am not saying to spam but rather use some method to overcome this general lack of concern for Flash developers by the search engines.
Are there any other methods to optimize for flash other than build a mirror html site. Which seems to me like work forced on the flash developer by slack search engine developers.
Many are Flash developers due to the artistic/design potential of Flash something that html does not offer (and cross browser DHTML is just a pain in the ...).
What are your thoughts. What are the current methods. It seems like a huge waste of energy and budding potential if most of the flash developers sites are ending up in "deep" space.
DISCUSSION: Limitations Of Href Tags In Flash
hi ... thx for the replys in a previous post .. but sorry i should have explained my question better and thought I would start another thread to explain this all .. OK .. (long discussion ahead)...
...the main problem is .. that I need to have a tool tip style clip appear, upon ROLLOVER of html text link within a dynamic flash html text box.
.. the limitation being that I can only trigger an asfunction on a href link (in a flash dynamix text box) upon a mouse click ... i know this is a subject that has come up before and has had no apparent solutions .. but still think there must be a way to achieve this ...
.. because of the fact that you can have a rollon and off (a:hover) .. if you apply css styling to a text box .. there must be a way to capitalise on that
.. idealy it would be great to have something like this (with a custom tag & attribute):
<p class='cssStyle'>More html tags and attribute support in <tooltip text='goto the macromedia website'>flash 8</tooltip> please!!!</p>
.. I could easily define the custom tag to achieve the tool tip 'look ...
BUT ... I still can not achieve firing the tooltip upon ROLLOVER ..
Heres my ideas about how to achieve the rollover:
* Somehow access the core function code that allows for hover to work upon rollon and off of a html link that has had css applied to it
* .. or a variation of that idea .. call a flash function in the css (triggered by the a:hover{call flash function SOMEHOW } ..
* I could have clipEvents running that could try and keep track of where the text link is , in regards to its x & y ... to cross check them with the mouse x & y .. to detect when a rollover of the link has occured (BUT .. would start to become quite cpu intensive once multiple words were tracked)
* ... and a similar idea is to have hidden buttons that sit over the text (which is better from the cpu point of view .. BUT then has the added headache of when scrolling the text ... trying to keep track of moving these hidden buttons with the text) ...
* Lastly .. there was an idea by someone else I read on here or flashkit .. of trying to detect when the system cursor had changed from an arrow to a hand ... thus detecting when a rollover had been fired .. this is actually a great idea .. but not sure it is achievable ???
SO .. sorry for the long winded post ... but hopefully someone has some ideas about how to achieve the first two ideas .. these would be the most solid ways to achieve this problem .. thx
Multiple Href Tags In Imported Text File
Hi
Can anyone tell me if this is possible? every time I add a second tag the text diappears from that point on.
I can have multiples of the same but if i edit the url it goes belly up
Thanks for any help
Anchor Tags
ok, I'm trying to make a FAQ type of page lie the one I have in HTML. I'm using dynamically loaded text in my flash page. Can I use the anchor tag to make bookmarks? (I.E. <a name="top"></a> and then later..... <a href="#top">[Top]</a> ) If not, what is there another way of doing this?
Anchor Tags ?
i thought i saw somewhere that in flash mx 2004 anchor tags were supported ,anyone know if this is possible with a dynamically loaded txt file ?
Anchor Tags ?
i thought i saw somewhere that in flash mx 2004 anchor tags were supported ,anyone know if this is possible with a dynamically loaded txt file ?
Problem With Anchor Tags
i've never had this problem before. on my launch page, the link to open the site also includes an anchor tag. when the site opens, the <title> of the page is what is in the code, plus # and the anchor name. that is problem number 1.
problem number 2 is that once you click on any of the nav buttons in the swf, it then changes the <title> again, removing the actual title and just leaving the #anchorname.
anybody have any ideas? i'm at a loss
Flash Nav And Anchor Tags
strange... Seems like such a simple thing, but it isn't working. I have flash button with the following:
on (press) {
getURL("testlist.html#toast");
}
It opens the testlist html page but doesn't go to the anchor for some reason. I know the anchors work when coming from other html pages.
Best Practice For Using Anchor Tags?
I am looking into using anchor tags for the first time and I am thinking I cant use them for this site because I am using xml and other variables that are being passed in on the first frame but maybe there as a chance that it still works. So I would like to know the best ways to use anchor tags. Someone who has used them please let me know.
Thanks,
Randy
Rollovers And Anchor Tags?
I'm looking for a way to implement a rollover, glossary-type tooltip.
Since you can apply CSS styles to a TextField (including the 'hover' effect), Flash is obviously able to interpret when the mouse is over an anchor (a substring pre/appended with the <a>...</a> tags).
When the mouse is over this text, Flash is able to update the style of the tagged substring (eg. add or remove underlining - depending on your CSS definitions).
Here's my issue: If Flash can detect this roll-over event, and then call some internal 're-styling' function, how can we, as developers, exploit this? How can we call our own function (like showing a tooltip-type MovieClip) when the user rolls over the tagged text?
I guess I just need to know how Flash implements the ":hover" CSS pseudo-class. ...then I can add my own function call.
Anyone have any pointers?
Cheers,
PPE
Best Practice For Using Anchor Tags?
I am looking into using anchor tags for the first time and I am thinking I cant use them for this site because I am using xml and other variables that are being passed in on the first frame but maybe there as a chance that it still works. So I would like to know the best ways to use anchor tags. Someone who has used them please let me know.
Thanks,
Randy
TextArea Anchor Tags
Is there any way to create an anchor (i.e. <a name="top"> --> <a href="#top"> inside of a textArea component utilizing an external .txt file? I've looked everywhere. If you cannot, is there an alternate way of going back to top of a textArea?
Thanks in Advance!!
Title And Anchor Tags
i've never encountered this before. on my launch page i have a button that launches the site in a new window with the swf with no toolbars or anything. the link opens the new window and goes to the bottom of the page, via an anchor tag. the problem is that in the <title> of the new window, the correct coded title appears, but it also has #anchorname at the end. why is that?
that's the first problem. the second problem is that after the new page loads with the #anchorname in the title, and use any of the nav in the swf, the title changes again, this time removing the proper title, just leaving #anchorname. i'm completely stumped. anybody have any ideas?
Dynamic Text And Anchor Tags
I'm trying to create a .swf that reads an external text file. The .swf needs to scroll but be able to recognise HTML tags in the text fille.
Now, I'm 99% there. However, when I add an anchor tag to the text, then click on it when the flash file is running, the flash window closes, rather than going to the web page in question.
Any ideas?
Code below:
First part
System.useCodepage=true;
newstext.html=true;
loadVariablesNum("news.txt", 0);
newsText.autosize = "left";
var maxheight = newsText._height;
var maxpos = 0-maxheight;
gotoAndStop(2);
Second part
if (newsText._y < maxpos){
newsText._y = 110;
}
newsText._y -= 1;
gotoAndPlay(2);
Cheers
Anchor Tags In HTML Text
Can I use anchor tags in an textField set to HTML, to trigger actionscript without it being treated as an external link (and navigating away from the page)?
Thanks
HTML Anchor Tags With '#' In Flash
hi..does anyone knows that the "#" anchor tags works or not in Flash dynamic textbox. I ve load html file in dynamic text which flash will parsed the HTML tags to XML. i knew that "a href" works in flash but the problem is when i use "<a href=math.html#measures>Measuring Tools</a>", it totally didnt work out. Means that it didnt find anchor name "measures" in the same HTML.
did anyone know this matter? please help me...
HTML Anchor Tags With '#' In Flash
hi..does anyone knows that the "#" anchor tags works or not in Flash dynamic textbox. I ve load html file in dynamic text which flash will parsed the HTML tags to XML. i knew that "a href" works in flash but the problem is when i use "<a href=math.html#measures>Measuring Tools</a>", it totally didnt work out. Means that it didnt find anchor name "measures" in the same HTML.
did anyone know this matter? please help me...
Use Anchor Tags, Input Text Gets Many Problems?
When I use Anchor Tags (change "Flash with Named Anchor" in publish also), i don't khow why can't use backspace, left, right, up, down arrow with Text Input. When i change Flash only in Publish. it's ok! Maybe backspace is hot key of back button in Browse! How can i repair it? Thank you!....
my English is not good!
HtmlText: Whitespace Between Anchor Tags Disappears
Why does this happen? Make a textbox and assign it some text:
Code:
article.htmlText = "<P>this is a word <a href='www.google.co.uk'>link1</a> <a href='www.yahoo.co.uk'>link2</a></P>"
trace(article.htmlText)
Notice the space between the two anchor tags. Well, if you run this, the space disappears and the trac shows that flash has removed it:
Code:
<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="24" COLOR="#000000">this is a word <A HREF="www.google.co.uk" TARGET="">link1</A><A HREF="www.yahoo.co.uk" TARGET="">link2</A></FONT></P></TEXTFORMAT>
Anchor Tags, Dynamic Text, Tabbing
I've got some html text that gets loaded and dropped into a dynamic text field:
ActionScript Code:
<p><ul><li><u><a href="asfunction:launchPage,El Segundo" tabindex="15">El Segundo</a></u></li><br />
<li><u><a href="asfunction:launchPage,Houston" tabindex="16">Houston</a></u></li><br />
<li><u><a href="asfunction:launchPage,Huntington Beach" tabindex="17">Huntington Beach</a></u></li><br />
<li><u><a href="asfunction:launchPage,Ogden" tabindex="18">Ogden</a></u></li><br />
<li><u><a href="asfunction:launchPage,Puget Sound" tabindex="19">Puget Sound</a></u></li></ul></p>
Clicking on the text works just dandy, but I can't seem to tab to it. I'd like to be able to tab to each link just as if it were in a regular HTML page.
In the past I've put invisible buttons over the text field and guessed about where the text would be, but you have to change the size and position every time you update the text.
Thoughts?
How Do I Use An Javascript Open Window Command WITH Anchor Tags
Hi all, (PLEASE VIEW ATTATCHED FILE)
I still ahve this issue with my anchor tags somehow conflicting with my javascript openNewWindow funtion. Basically you can click on the next button and then use the back and forward buttons on the browser as you would a normal web page right thats the theory. Works prefectly in this case.
HOWEVER: In my flash "I NEED TO" be able to make flash open a small window with specific features turned off (toolbars etc, u knwo what I mean) So I have used the javascript funtion to do this.
PROBLEM: after you click Open Window in the movie the new window opens. BUT now try and use back and forward again in the original flash movie.
See what I mean, why does the movie dissappear?
DESPERATE, I have abig deadline for this project I'm working on.
HEEEELLLLLLPPPPPPPP!!!!!!!
Forever in your debt
Marcus
Help Use Anchor Tags In Flash 8, Input Text Gets Many Problems?
When I use Anchor Tags (change "Flash with Named Anchor" in publish also), i don't khow why can't use backspace, left, right, up, down arrow with Text Input. When i change Flash only in Publish. it's ok! Maybe backspace is hot key of back button in Browse! How can i repair it? Thank you for your help!....
How To Insert Url Tags Around A Link Automatically
hi,
while doing a guestbook, I wonder how I can put url tags around a link automatically.
the textfields variable contains all the html code, so I could look for "www" or "http" but how could i find out where the link ends ?
or is this easier to accomplish with the php script, taht writes the string on the server ?
thanks all
PHP Problem... How To Insert Normal Text In Between Tags
Gosh darnit, I don't get. I want to insert a long paragraph of text in place of the --------- (dashes) in this:
<?
$ToEmail = "$ToEmail";
$ToName = "$ToName";
$ToSubject = "Your anwers from Dual DiagnosisContinued Learning";
$EmailBody = "----------------
$answer_040
------------------
$answer_050
----------------------
$answer_120";
$Message = $EmailBody.$EmailFooter;
mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: ".$FirstName." <".$Email.">");
Print "_root.Mail.EmailStatus=Complete - Your mail has been sent";
?>
$EmailFooter="
This message was sent by: $FirstName from $REMOTE_ADDR If you feel that you recieved this e-mail by accident please contact us at www.somesite.com";
$EmailBody = "Sent By: $FirstName
Senders Email: $Email
Senders Company: $Company
Message Sent:
$ToComments
Sender Heard About Site From: $HearAbout
$case1 $case2";
PLEASE HELP
Insert Html Tags Inside XML Node
What would be the correct way to insert a block of html inside an xml node?
Code:
<root>
<text>html goes here</text>
</root>
html block to go into the node:
Code:
<P><FONT>Hello <B>World</B></FONT></P><P><FONT>Hi you!</FONT></P>
Any help would be greatly appreciated.
[F8] Dynamic Text, Text Fields And <a Href> Tags.
I have been trying to figure this out for a very long time. My company's web designer went MIA and left us with a Flash site that is very hard to update (and no original FLA's).I have resorted to decompiling his SWF's with pretty impressive success. Only thing I can't figure out how to do is get dynamic text displayed in a text field to accurately display funtional links. If I select the text field and click the "render text as HTML" button and export the SWF, no text appears at all. If I select use device fonts, the links work, but the text looks funny. I am using Flash 8, but saving as a flash MX 2004 document because I think that's what the designer used and... I guess I don't have a very good reason, it just seemed like the right thing to do... Also I'm exporting it as a Flash 6 movie because our web stats say that almost 10% of visitors have that installed. If it helps the code looks like this:
loadVariables("blahblahblah.txt", "_root.mcData");
stop ();
Any help would be hugely appreciated.
Using Anchor Or Anchor Effect In A Scrollpane
Hi all,
I'm using the scrollpane to display text that I've formatted as FAQs. I now need to recreate the text so that the questions all appear at the top and the user can click on any question which will then link them to the appropriate place in the copy below. I also need the scrollbar to adjust up and down as the user links up and down using anchors.
Does anyone know how to do this in Flash MX?
any help would be appreciated.
Using Anchor Or Anchor Effect In A Scrollpane
Hi all,
I'm using the scrollpane to display text that I've formatted as FAQs. I now need to recreate the text so that the questions all appear at the top and the user can click on any question which will then link them to the appropriate place in the copy below. I also need the scrollbar to adjust up and down as the user links up and down using anchors.
Does anyone know how to do this in Flash MX?
any help would be appreciated.
Stylesheet Applying To A Tags, But Not B Tags In Dynamic Text Box
Hello, I have a dynamic text box that pulls HTML-formatted content from a PHP script and everything is working, including getting it formatted with a stylesheet, except the stylesheet seems to be ignored for <B> tags. This is the code I tried:
b,B { font-weight:bold; color:#6600FF; font-family:Baskerville; }
a:link { text-decoration:none; font-family:Baskerville; font-weight:bold; }
a:hover { text-decoration:underline; }
a:active { text-decoration:none; }
This is just for texting. I have a simple textbox with plain text, part of it in bold, part of it as a link, and the link gets the Baskerville font, but the bold tag doesn't. When I set a color for the link, the link gets a color but the bold tag doesn't. I'm stumped. Any ideas?
My Symbol Can't Insert Into My Insert Texrt
i have few button to let user click and the symbol will insert into the input text...
i change my input box to 'symbol' but i facing the problem that i can't insert character other than symbol...
pls check it out my fla and try out...
Html Tags In Xml Tags
Hi,
i've got this XML file - in it the tag below:
<level.one name="ql2<br>na">
i'm loading the xml into flash and i want to display the value of the attribute "name" inside a dynamic text box, i marked the "render text as html" BUT: inside the xml i can't put "<br>" because of the "<" ">" - so what do i put instead so reading the xml will be ok and flash can read it right?
thanks in advanced,
Maya.
Href
hi gang...
my logo on my site is in flash...but the rest of the page is in html...
i want to be able to click on the flash logo to go to the homepage (index.html)...
should this be an href surrounding the <object> tag or a function built in flash?
help!
s.
<A HREF...
Anchor problem!
I am using a Flash-file in combination with databases and want to make reqests from within a dynamic text-field with HTML. The requests sometimes can be quite long and when the call exceeds 127 characters it is cut by Flash.
It is possible to make the request with the getURL action but it would look much nicer to have anchors on the text.
Does somebody know if there is a length-limit on anchor-tag-variables in dynamic text-fields?
Href Pop-up
i'm looking for a script that will change all < a href's so that they include the javascript to be pop-up's. I started out with this -
myHtmlString.split('href="').join('href="javascrip t:NewWindow=window.open('')
but I can't figure out how to close it off. I need to add the ') at the end of the href but am not sure how to get it in there.
Any help is appreciated.
A Href Bug?
this is an interesting potential bug in MX. when I place an anchor tag below y-axis: 622.6 it wont link to the specified URL. The anchor is implimented by way of a dynamic textfield which calls a text file.
Other anchors as well as this one work just fine above y-axis: 622.6 however when I move any of them below...nothing.
All of my textfields reside on the second to top layer, just under an actions layer so I know it is not a matter of focus. HTML is enabled. I've tried making selectable and non-selectable.
ne ideas?
XML Href Help
Here is my code. I want the text Launch Site to be a Href to open a website. What is the XML code to do this?
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<pic>
<image>images/AP_website_slide.jpg</image>
<caption>ArchPro Product Website- 2003</caption>
<detail>Product website created in Flash MX, 3D Studio Max and Photoshop. Launch Site</detail>
</pic>
Thanks!
XML Href Help
Here is my code. I want the text Launch Site to be a Href to open a website. What is the XML code to do this?
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<pic>
<image>images/AP_website_slide.jpg</image>
<caption>ArchPro Product Website- 2003</caption>
<detail>Product website created in Flash MX, 3D Studio Max and Photoshop. Launch Site</detail>
</pic>
Thanks!
A Href Bug?
Last edited by miscellane : 2004-05-23 at 20:29.
fixed
XML Href Targets
Hello, I am importing a .xml which basically just displays text with a hyperlink, can any of you tell me what syntax I use to specify targets like _top or a frame name.
I have this sort os syntax so far...
"<a href="+ link +">"
Im guessing the target reference goe's in that bit somewhere.
Thanks
David
<a Href></> In Flash
Hi,
this is my question,
from a phpscript I receive a list of links in a text field in my flash movie.
so when the list is loaded, the <a href> works fine in the way that if I click on to the link in my text field, I go where my link bring me, well.
My problem is that I would like from that link call another phpscript but I would like to stay in my movie ! You understand ? It is like I would like a "gotoAndPlay(somewhere) from that HTML link, is that possible ?
THanks
<A HREF> ROLLOVERS?
does anyone know a way, when importing text which has a hyperlink on it into a dynamic text box, to have that hyperlink rollover?
for instance:
you have a variable
x = "<A HREF="whatever.com">link</A>"
and you have a dynamic text field assigned to var x.
is there a way to have the text "link" cahnge color when its rolled over? I guess like the hover style in html.
if anyone can help - it would be much appreciated.
Using <a Href To Control The .swf
We've got a flash movie reading content in html from a text file.
Using <a href for hyperlink in the html data (ie outside the Flash) can you control the .swf e.g. go to a framenumber and/or set a variable?
|