ActionScript 3.0 :: Creating A Hyperlink In TextField W/o Htmltext?
Feb 15, 2009
I'm trying to create hyperlinks within TextFields by using a combination of plain text and the getCharIndexAtPoint method of the TextField object.
I've got everything nailed down except for the handCursor. To solve this problem I decided to place the TextField within a Sprite container and have the MOUSE_MOVE event attached to the TextField signal to its parent [Sprite container] that it should modify its buttonMode, useHandCursor, and mouseChildren properties to allow the hand cursor to be displayed, which I'm happy to say does work.
Unfortunately when I set the mouseChildren to false and the buttonMode and useHandCursor to true. The TextField within the Sprite container stops tracking the mouse...which I understand why but was wondering if there's some other combination that would allow me to do what I need to do?
[Code]...
View 2 Replies
Similar Posts:
Jul 16, 2009
I created a Flex application with a textArea. I'm populating the textArea's htmlText property.I have a context menu on the textArea, but I don't see how to make a different context menu when the user right clicks on a <a href...>link</a>. Can I control the context menu for a link displayed inside of the htmlText of a mx:TextArea?
View 1 Replies
Apr 6, 2009
I'm looking to create a hyperlink outside of my flash website. Does anyone have the Actionscript 3.0 to code an instance of a button? or a better way to code this???
View 3 Replies
Mar 18, 2010
I have got a performance problem about TextField.htmlText +=msg.And I know thatTextField.appendText(msg) works better than TextField.text +=msg.So I wonder if there's some method better than TextField.htmlText +=msg?
View 2 Replies
May 2, 2008
just because i got no response i am putting this up once again.When i use htmlText in textFields, it does not render smooth. How can this be fixed ?Tried embedding fonts... but nothing seems to work.
View 4 Replies
Apr 15, 2011
I'm trying to link out to other websites using a simple textfield with the text options - link, and a destination, _blank. It's a large document and I'm adding to it daily. The problem is, when I return to flash, and make changes in other places, the earlier links I had in place change. [URL] explain to me why this is happening and how to prevent it? It's incredibly frustraing, stupid.Here is a link to the project. [URL]
View 6 Replies
Sep 11, 2005
I am trying to create a bookmark in my e-learning application. So far I have been abe to create 2 buttons that write and receive information from a shared object. My next step is writing the current frame and swfs to the shared object, but I am unsure how to write the code to do this. How would I display the swf's retreived from a shared object as a hyperlink, where the user can click on and return to their bookmarked spot?
View 2 Replies
Mar 16, 2009
I have an odd predicament that I'm trying to wrap my head around. I have a textField, that is populated by data from an xml file. It contains simple line html line break tags, and when I use the htmlText option, it doesn't seem to recognize those tags, even though they don't show up when I view it online. Here is my code:
Code:
//FLASHVARS CODE
var varName:String;
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
for (varName in paramObj) {
[Code]......
I can't figure out how to make it render properly. If I choose a dynamic text field already on the stage it works fine, but then the scrollbar doesn't work. I read that a TextField automatically uses a scrollbar when it gets too long. Can anyone suggest a possible work around for this? I feel the answer is staring me in the face and I just can't see it.
View 7 Replies
Apr 29, 2009
I have an odd predicament that I'm trying to wrap my head around. I have a textField, that is populated by data from an xml file. It contains simple line html line break tags, and when I use the htmlText option, it doesn't seem to recognize those tags, even though they don't show up when I view it online. Here is my code:
Code:
//FLASHVARS CODE
var varName:String;
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
[code]...
I can't figure out how to make it render properly. If I choose a dynamic text field already on the stage it works fine, but then the scrollbar doesn't work. I read that a TextField automatically uses a scrollbar when it gets too long.
View 1 Replies
Dec 23, 2009
how could we remove auto tag adding by htmlText Property because when we apply htmlText for a textfield it automatically add <p> and <font> tag. In my project i am saving one textfield property <p align='right'> in server but when i am assigning this value from server its changing to <p align='left'>. So how could we remove this auto formatting by htmlText? As in [URL] link there is written also "When its htmlText property is traced, the output is the HTML-formatted String, with additional tags (such as <P> and <FONT>) automatically added by Flash Player." i want to remove this auto adding tag.
View 3 Replies
Mar 24, 2009
I have a simple class which contains a TextField. The textfield is populated with data from an XML file.i am using the code:
txtField.htmlText = xmlElement.node.node.text();
txtField.setTextFormat(txtFmt);
If i don't use any HTML tags, it displays fine. But if I add tags, such as <a> or <b>, etc... the text within the tags does not display. For example, if in the XML text i have:
<node>For more information, <a href='
http://www.link.com'>Click
Here</a> to see the information.When I run the flash move, it displays:For more informationto see the information.If i remove the <a> tags, it displays fine.
View 3 Replies
Sep 24, 2009
I have 3 embedded fonts in my library and I have given them a class name.Now I would like to use these fonts in HTML in a TextField object.How do I do this? I created a stylesheet and entered the font name, but it still picks it from my harddrive, because it doesn't work on other computers where the font is not installed.I have a font embedded named "Edo", and gave it the classname Edo.[code]
View 12 Replies
Mar 16, 2010
when i insert an image over xml into textfield with htmlText, it automatically makes some kind of padding left and above them image. Is there a way to get rid of that padding?
View 1 Replies
Aug 20, 2010
I am having a major issue with a textfield. I have a dynamic text field which receives html so its htmlText I cant use the regular textFormat as the overrides the bold tags in the html. So I need to use css. Minor complication I have to do inline css as I cant load external data due to the project specs. Not a problem I have done inline css pretty easy. But they want a non web safe font. Again no prob I can embed fonts via the library. The problem is getting the css to use the embed font from the library. I have tried adding the font as a object to my code and then in the css referencing it via myfont.fontName, as a string etc.. 5
View 2 Replies
Mar 22, 2011
I'm using TextFields to draw text into BitmapData. The problem is that my words are not wrapped completely, by example :
var textField:TextField = new TextField();
textField.wordWrap = true;
textField.multiline = true;
textField.width = width;
[Code]...
View 1 Replies
Jul 29, 2010
HTMLText is displaying really strangely. I'm displaying a textField with htmlText provided through XML, and in this bulleted list it'll display the first line all on one line, keep going off the end of the textareas size (ie. not do multiline) until the last word of the bullet, then put that word at the start of the next line. And it'll put the last word on the next line no matter how long your bullet item is.
eg.
myField.htmlText = "<li>Seek the input of experts</li>;
Would output
'seek the input of
experts'
I've checked and this thread was similar however I've removed all my tweens to test and it hasn't had any effect.
what to do about this? I've tried these to no avail:
myField.htmlText = myString;
myField.autoSize = TextFieldAutoSize.LEFT;
myField.wordWrap = true;
View 2 Replies
Dec 31, 2008
In the below XML...
[Code]...
How to set inline style sheet to htmltext of textfield component as mentioned in the xml CDATA. At present , i am using textfield.htmlText propert , but i am not able to get the
fontfamily as mentioned in the xml CDATA. The text is also not getting displayed in the correct format. The image is not coming in between the 2 question strings and its getting displayed at the bottom of the question while the 2 question strings("q text info",
"with images also") are displayed as a single string. How to reformat the xml so that the image comes in between.
View 2 Replies
Jun 24, 2009
I have some HTML loaded from an XML document that includes web links (anchor tags). I am using a TextField object to display the text, and am plugging the XML data into the htmlText property of the TextField, and the text is rendering with HTML markup, links are working etc.
The problem I'm seeing is that a new line is created before and after the link, so html like this:
hello world <a href ="#">this is a link</a> and all of this should be on the same line.
is rendered like this (with specific attention paid to the new lines): Does anyone know of a way to prevent these new lines from appearing when using HTML links within a TextField?
View 2 Replies
Oct 28, 2010
TextFiled is not receiving mouseEvents, coz of the sprite on top:
[Code]...
View 3 Replies
May 12, 2004
i'm making a small "add news" movie for a site in actionscript. When I insert an image in my textField, I can only move the cursor with my keys and not with my mouse anymore. I put the image always in front. I also have to click one time in my textfield, otherwise my text appears under my image. When I click it aligns to the right.
[Code]...
View 2 Replies
Jan 11, 2010
I want to do is add a simple hyperlink in my xmlhtml hyperlink in my xml.how to do a hyperlink in xml.This is what I do know,you can add the <a href="http:[url]...but that does not work for me,when i save and preview my fla, it takes away my scroll bar that i have.I have also seen somwhere you can use the <?[[DATA tag, but this aswell doesnt work for me in my FLA, is there somewhere i need to reference hyperlinks before I can modify my xml?
View 38 Replies
Jun 13, 2010
does anyone know in which places does a dynamic textfield wrap (or creates a new line that doesn't exist in the original string), and how to connect it to the proper position in it's htmlText?if it's characters like "", how would i find the place where this "" happened, in the original htmlText?
View 4 Replies
Jan 13, 2009
Is it possible to capture the image loading event like when the image is fully loaded and such when it is assigned to the htmlText of the textFiel???
I have a scrollPane that contains a textField which is loading an image via img tag where there is no scrollbars initially because the textField is not large enough in the beginning, but it is larger than the scrollPane after the image is fully loaded.. and I am trying to update the scrollPane once the image is fully loaded..
View 0 Replies
Feb 12, 2009
When I used TextField to display a link, it doesn't work as I expected.here is the code I used:
Code: Select allpackage {
import flash.display.*;
public class TestCustomClass extends Sprite {[code]....
But there's nothing displayed. I don't know why.I looked up the handbook of AS, it said there's no "html" property of TextField, so I commented out.
View 2 Replies
Jun 15, 2004
Below is text for creating textfield on the fly. I want to create multiple fields, so I have variables for the names. But the code does not work
loadText = new LoadVars();
loadText.load("data.txt");
loadText.onLoad = function() {
[Code]....
View 6 Replies
Aug 10, 2009
I am trying to create 6 TextFields with a loop which I have done but I can't seem to figure out the right syntax for setting the properties such as font, size, etc. in the loop. Here is my basic code:
var Tiles:Array = new Array();for (var i:Number = 1; i< 7; i++){Titles[i] = new TextField();
Titles[i].TextFormat.size = 17;}addChild(Titles[f]);}
View 3 Replies
Jul 10, 2011
Just transitioning into object orient programming and I got stuck trying to create textField using static function. I searched online about this and none of them were useful. I dont want this to be just public function because then I cant access this function from other classes. I would like every classes to access this function so I need it to be static.
package {
import blahblah
public class example extends MovieClip{[code]..........
View 6 Replies
Sep 17, 2009
I need to make textfields appear that display a number. It's for making score numbers pop up out of enemies. I can create a single textfield that displays the appropriate number but I don't understand how I can set up variables in it. If I've created a textfield, how can I then remove it after a certain amount of time? It doesn't make sense to me since the textfield only seems to exist as an instance and not an object I can refer to.
View 0 Replies
Oct 5, 2010
I wanted to create an instance of a textField on the stage with simple text. I thought the following piece of code would work:
var textfield1:TextField = new TextField();
textfield1.text = "testing text";
textfield1.x = 300;
textfield1.y = 300;
textfield1.height = 150;
textfield1.width = 150;
textfield1.autoSize = TextFieldAutoSize.LEFT;
As far as I can tell the object is created and IS there but I have to call it somehow I guess.
View 2 Replies
Mar 24, 2009
I have a textField with a lot of stuff in it, so I'm creating a scroller using a mask. To do the math to make the scroller work right, I need the height of the textField. But the stuff in it is retrieved from XML and the length of it varies when it is updated, which is quite often. Is there a way I can find the height of just the text in the textField?
View 1 Replies