Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Link In Dynamic Textfield To Jump To Section Of Same Textfield



Howdy all,

I know you've all seen this before - you are on a website and you click a link and you stay on the same page but jump down to a different section of the page. Like an FAQ page or something where all the questions are listed above but you click on one and jumps down to the answer below.

Is it possible to do this in a dynamic (scrollable) textfield with externally loaded text files in Flash? I don't have DW and I know that there are limited html tags available but if anyone knows an easy way to do this please let me know!

thanks!



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 12-30-2003, 03:05 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Link In Dynamic Textfield To Jump To Section Of Same Textfield
Howdy all,

I know you've all seen this before - you are on a website and you click a link and you stay on the same page but jump down to a different section of the page. Like an FAQ page or something where all the questions are listed above but you click on one and jumps down to the answer below.

Is it possible to do this in a dynamic (scrollable) textfield with externally loaded text files in Flash? I don't have DW and I know that there are limited html tags available but if anyone knows an easy way to do this please let me know!

thanks!

Link In Dynamic Textfield
Hi

I want to create a link n a certain word in my dynamic textfield to another frame in my flashmovie. Is this possible? I know how to create links to a webpage but to a frame?????

Thx

T__

Link Length In Dynamic TextField
Anyone have any other hacks to get around this bug?

Flash HTML text fields and the A HREF tag ?

I have a Flash site with dynamic content and there are links that need to be long...these links point to internal pages (and need to work for an HTML version as well), so I don't like the idea of setting up a links.php file. I'm already doing that to link to Google maps and their massive urls.

I was hoping for some thoughts on a way around this?

Any ideas?

Thanks everybody!

Making A Dynamic Textfield Into A Link
I'm having a problem making the content of a dynamic text field a link to an outside URL.

The idea is that a user clicks a button which tells a movie clip to go to and stop on a labeled frame. When the movie stops at that named frame the various text fields are loaded with the appropriate content.

The problem I have is how to make the text field "linkText" a link to the URL of the website.

Here's an example:

//The button action
on (release)
{
portfolio.gotoAndStop ("albertafilm");
}


//The movieclip frame action
loadMovie("./pics/albertafilm.jpg", "_root.targetClip.content.portfolio.container");
titleText = "ALBERTA FILM";
contentText = "This is a small description of the project.";
linkText = "www.ALBERTAFILMNETWORK.com";

I suppose I could put an invisible button over the text field and somehow make that open a new window to the link but I feel this whole approach I'm using is a bit sloppy. I would rather have the button set a variable that takes care of all of the above and manage the content through a .txt file but I'm at a loss as to how to do that. I have about 15 sites I need to showcase so updates would be easier that way but...

Any information would be appreciated, a tutorial link or a page in tha manual

Thanks for your time.

Dynamic Textfield Capturing A Link's OVER Event
i don't know if it's possible. but if anyone has a way to do it i'd appreciate it.

is there anything similar to getImageReference, to the effect of getLinkReference? so that i can just assign an id and get the mouse events that way?


HTML Code:
<a id="helloID" href="event:hello">hey</a>
i can get the TextEvent.LINK to work, but i need more access to the user's interaction with the link.

thanks.

Textfield Woes, How To Anti-Alias A Dynamic Textfield?
this is driving me nuts, even if i have it marked so that my dynamic textfield is anti aliased, it still looks as if its text is aliased. And if i simply make that textfield Static, the text all of a sudden looks amazingly crisp and anti aliased.

How can i fix this?! I am attempting to load xml data into my text fields but its wasted if the text looks like crap..

So can anyone enlighten me on how to do this? i tried searching Flashs help, all i came out with was "Textfield._quality" but i do not understand what the description means exactly.. And i tried coding my textfield to _quality = "BEST";, with no avail.

Please help, i'v seen other websites with what i am sure is dynamically loaded fields, and smooth looking text... so what gives?

Thanks!

Masking Dynamic Textfield When The Textfield Has A Stylesheet
ok... i have a movieClip containing dynamic textfields, which i'm trying to mask. the textfields are linked to a stylesheet. i understand that, for the masking to work, i have to embed the font. so i've placed the font in the library, given it a linkage name and set embedFonts = true for the dynamic textfields.

what do i do next? and does the fact that i'm embeding the font override the effect of the stylesheet?

(sorry if i sound confused over this. that's because i am.)

thanks in advance for any help

[F8] Input Textfield Inside A Dynamic Textfield?
Hi,

Is it possible to place an input textfield inside a dynamic textfield?

I'd like to replace the variable, this.nTotal, below with an input textfield.
Is there some way to do this?

this.txtComplete.text = "There are " + this.nTotal + " pages in " + this.sGirlName + "'s book.";

Thanks!

Masking Dynamic Textfield When The Textfield Has A Stylesheet
ok... i have a movieClip containing dynamic textfields, which i'm trying to mask. the textfields are linked to a stylesheet. i understand that, for the masking to work, i have to embed the font. so i've placed the font in the library, given it a linkage name and set embedFonts = true for the dynamic textfields.

what do i do next? and does the fact that i'm embeding the font override the effect of the stylesheet?

(sorry if i sound confused over this. that's because i am.)

thanks in advance for any help


||| O ^ | + O ¬

Masking Dynamic Textfield When The Textfield Has A Stylesheet
ok... i have a movieClip containing dynamic textfields, which i'm trying to mask. the textfields are linked to a stylesheet. i understand that, for the masking to work, i have to embed the font. so i've placed the font in the library, given it a linkage name and set embedFonts = true for the dynamic textfields.

what do i do next? and does the fact that i'm embeding the font override the effect of the stylesheet?

(sorry if i sound confused over this. that's because i am.)

thanks in advance for any help


||| O ^ | + O ¬

Masking Dynamic Textfield When The Textfield Has A Stylesheet
ok... i have a movieClip containing dynamic textfields, which i'm trying to mask. the textfields are linked to a stylesheet. i understand that, for the masking to work, i have to embed the font. so i've placed the font in the library, given it a linkage name and set embedFonts = true for the dynamic textfields.

what do i do next? and does the fact that i'm embeding the font override the effect of the stylesheet?

(sorry if i sound confused over this. that's because i am.)

thanks in advance for any help


||| O ^ | + O ¬

Jump From One Textfield To Another
Hi, I am trying to build a crossword puzzle and I am having a very hard time figuring out how to do some things.

What I did is making a movieclip that contains a square and an input text. Then I duplicated this movieclip to form the crossword puzzle. I named each instance of the movieclip in a consecutive fashion (a1, a2, a3, a4, etc..). What I need to achieve is that when you type in the first box the next box is automatically selected (so you can type a word without having to select a box each time you type a letter). I have been working for two days in this and I just can't figure it out. Please help!.

What I tried to do is storing the box you click in a variable, something like: lastBoxSelected = this; and it stores in a variable something like: _level0.Box01.textfield I was thinking in trying to extract from this variable the number "01" so then I could tell to select box 02, but the variable is not stores as a string so I cant do a substring or anything like that.

Jump To Index In Textfield
Hi to all,

Does anybody know if it is possible to jump to a certain index-id inside a HTML textfield of the movieclip when clicking on a button, just like possible in a normal HTML-page using a # followed by the ID at the end of the link destination. (i.e. http:\www.mypage.comindex.html#chapter2)

Thanx in advance.
Keep up to good work.

Bye
Furetto

Get A Textfield To 'jump' To An Entry
hey ho

assuming you have a great big file loaded into a textfield (for example, an online journal), is there any concievable way to get the textfield to jump to an entry further along in the same textfield? for example, in html, you've got:

Code:
<a href="#entry101">here's my first entry</a>
blah blah blah blah ...
<a name="entry1">Saturday 4th July 1904</a>
today i went with my family to see shardik the giant bear...
see, at the moment my blog is powered by blogger, which archives by the month, and each entry is given an entry id. i got a search working, but when it locates the file with the specific text, all it does is load up the entire month, and i'd like to have the ability to jump to the right entry, too. any ideas?

p.s. there is also an automatically generated xml / rss feed of my blog, however it is generated by atomz, and aside from having a big fat ATOMZ header on it, a lot of the tags appear to have ampersands in them. is this an issue with xml data in flash?

cheers

TextField Jump To Position Button
Ok.. I wonder if anyone can help me here:

I have a textfield with associated scrollbar. The text is quite long and split into sections. Above the text are some buttons which use setScrollPosition on the scrollbar to flick it down to the desired points. This all works fine and at the moment is hard coded by running it and counting the scroll clicks needed.

However if the flash file is stretched by the user these buttons then do not work because the text no longer takes up the same amount of lines etc.

So my question is:

Is there a better way to get the desired effect? Its basically like using an <A HREF="#name">anchor link</A> in an htm page. Is this possible in flash? or is it possible in some other way? perhaps somehow scrolling down the textfield till it finds the section name keywords?

I have a feeling it isn't possible any other way and have searched around for a solution but can't find anything, so any help would be appreciated. I really would like to keep both the scrolling effect and the quick access buttons, i know i could do it by changing the text but then i would lose the scrolling ability.

TextField Jump To Position Button
Ok.. I wonder if anyone can help me here:

I have a textfield with associated scrollbar. The text is quite long and split into sections. Above the text are some buttons which use setScrollPosition on the scrollbar to flick it down to the desired points. This all works fine and at the moment is hard coded by running it and counting the scroll clicks needed.

However if the flash file is stretched by the user these buttons then do not work because the text no longer takes up the same amount of lines etc.

So my question is:

Is there a better way to get the desired effect? Its basically like using an <A HREF="#name">anchor link</A> in an htm page. Is this possible in flash? or is it possible in some other way? perhaps somehow scrolling down the textfield till it finds the section name keywords?

I have a feeling it isn't possible any other way and have searched around for a solution but can't find anything, so any help would be appreciated. I really would like to keep both the scrolling effect and the quick access buttons, i know i could do it by changing the text but then i would lose the scrolling ability.

Input Textfield, Jump With Enter?
Well I tried to delete my thread after I found out the answer but it wouldn't let me to do that. So I am sorry if I have wasted your time.

Take care,

J

Textfield And Link
Hi all,

Does anybody know how to make a link inside the textfield?
Thanks

Link In TextField
Hi,
I'm trying to add a simple link to a TextField so that it's clickable and will trigger the hand cursor when hovered over. I've tried to use a TextFormat.url function in combination with TextEvent.LINK, but that doesn't do anything for me. In fact, I can't get TextFormat.url to even be applied to the Text!

If I have this code:

Code:
hyperlinkTF.url = "http://www.google.com";
__hyperlink = new TextField();
__hyperlink.addEventListener(TextEvent.LINK, handleLinkClick, false, 0, true);

__hyperlink.defaultTextFormat = hyperlinkTF;
__hyperlink.htmlText = "Google";

trace(__hyperlink.htmlText);
...I end up with a non-clickable link that does not trigger the hand cursor. The trace is:

Code:
<P ALIGN="LEFT"><FONT FACE="Times New Roman" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="0">Google</FONT></P>
I can't find ANYTHING documenting this issue.

And yes, I CAN use a CLICK listener, but I don't get the hand cursor that way. Supposedly the LINK event is supposed to trigger the hand cursor in some circumstances.

Can someone help me?

Loading Text & JPG Nito TextField Makes Textfield White
Hi guys !

Does anyone know, why a textfield may become white when loading text + JPGs into it? Sometimes it happens to me, sometimes not. I haven't figured out why.

If you have any clues... I'd be really thankful

The AS I'm using:

_target.container.t.html = true
_target.container.t.condenseWhite = true
_target.container.t.autoSize = "left";
_target.container.t.htmlText = _data.texto

The String ( &HTML ):

"Text lorem ipsum bla bla ..... <img style='WIDTH: 154px; HEIGHT: 59px' height='298' width='856' alt='' src='http://www.spacilong.com/arq/img/AlcatelLucent_Hor_2col_sm.jpg' />

Disable Link In Textfield?
Hi there,

is it possible to disable a link in a textfield? I don't want to remove the link, the purpose is that I am currently writing a html-editor where I want the user to set/unset links but nothing shall happen if the link in the textfield is clicked.

Any solution for that?

Thanks, Tim

Link In A Scrolling Textfield
I created a scrolling textfield and inserted a link in it. The code of the existing link is like this:
<A HREF="http://www.somesite.com">Some site</A>.
This works just fine, but I need to open it in a new window, so I added "target ="_blank" to the existing code and now it looks like this:
<A HREF="http://www.somesite.com" target="_blank">Somesite.com</A>.
Unfortunately, it's not working, I am getting a syntax error message.It seems to have a problem with "_blank" part. Is there any way to make this work?
Thanx-
Lee Bosh

Scripted Link In Textfield
Hello,

I am trying to insert a link in a textfield, which, when clicked, will cause some code to be executed. The actual effect should be something like a button symbol.
I have already written a small bit of code to read and take out the part of the text that should show the link, and then to create a simple instance of a button. The button would then have no images, except the hitarea. The problem here is, that I am so far unable to find the correct position for the instance of the button. If I could find that position, I would be able to fake the entire link.
I am using a simple textfield with htmlText now. Does anyone know of a way to easily show some text with a script-triggering link in it?
Thanks in advance.

Link From Variable In Textfield?
Hi,

I'm trying to get a variable that I get from a PHP-script to be a link in a textfield.

Right now I'm using an html tag to make a link to the information I want to display...

This works but I think its not good enough... I want to get a "rollOver" function on the Headline instead of a new line that says click me.

The following code displays in the textfield "content":

News

Headline <--Headline from the database
Teaser <-- Text from the database
Click me <-- Html link that displays the full text in a textfeild called "info"

Headline
Teaser
Click me

...


Code:

function act(paramString) {

var params = paramString.split("#");
content.htmlText(params[0]);

info.htmlText = unescape(params[1]); }

function showValues() {
content.text = "News

";
for (i=0; i < this.n; i++){

content.htmlText += this["headline"+i] + this["teaser"+i] + "<br>" + "<a href='asfunction:act," + this["actId"+i] + "#" + escape(this["text"+i])
+"'> <font color='#000000'>Click this link</font></a><br><br>";
}
}

var c = new LoadVars();
c.onLoad = showValues;
c.load("my_PHP_fil.php");
stop();

I want it to look like this:

News

Headline
Teaser

Headline
Teaser

...

And the text in the headline should be the link...

Please help me!

/Marcus

Link From Variable In Textfield?
Hi,

I'm trying to get a variable that I get from a PHP-script to be a link in a textfield.

Right now I'm using an html tag to make a link to the information I want to display...

This works but I think its not good enough... I want to get a "rollOver" function on the Headline instead of a new line that says click me.

The following code displays in the textfield "content":

News

Headline <--Headline from the database
Teaser <-- Text from the database
Click me <-- Html link that displays the full text in a textfeild called "info"

Headline
Teaser
Click me

...


Code:

function act(paramString) {

var params = paramString.split("#");
content.htmlText(params[0]);

info.htmlText = unescape(params[1]); }

function showValues() {
content.text = "News

";
for (i=0; i < this.n; i++){

content.htmlText += this["headline"+i] + this["teaser"+i] + "<br>" + "<a href='asfunction:act," + this["actId"+i] + "#" + escape(this["text"+i])
+"'> <font color='#000000'>Click this link</font></a><br><br>";
}
}

var c = new LoadVars();
c.onLoad = showValues;
c.load("my_PHP_fil.php");
stop();

I want it to look like this:

News

Headline
Teaser

Headline
Teaser

...

And the text in the headline should be the link...

Please help me!

/Marcus

Textfield Link Function?
hey ya'll ... i've got some dynamic text with a bunch of links in it. i remember stumbling across someone's function that made all the links active (with textFormat options like underline on/off and color).

anyone know where this is or do i need to lay off the crack? j/k. tia!

[textfield] How To Check If Input Text Is More Than Textfield Height?
Hi guys, Is there a way to check if the text that has been input into the textfield is more than the height of the textfield.

I have set the scrollbar hidden and it will become unhidden once the text is greater the the textfield height.

I did try to count the input text and set the visiblity of the scrollbar against that count. Unfortunatly this is unreliable.

Anyone got a better idea?

Cheers
Paul

[textfield] How To Check If Input Text Is More Than Textfield Height?
Hi guys, Is there a way to check if the text that has been input into the textfield is more than the height of the textfield.

I have set the scrollbar hidden and it will become unhidden once the text is greater the the textfield height.

I did try to count the input text and set the visiblity of the scrollbar against that count. Unfortunatly this is unreliable.

Anyone got a better idea?

Cheers
Paul

After Killing The Focus On A Textfield, The Textfield Remains Selected. Why ?
Hi.
I have a serious problem with the deselecting text when I kill the focus on a textfield.
to see better what I am trying to say, please clcick this link: http://www.eurogaz.ro/rring/expert/

Hard Code Link In Textfield
hey there I just wanted to hard code a few links in a dynamic textfield

Code:
links="<A HREF=http://www.flashkit.com ">flashkit</A>"

I tried to put a <br> and another link on the next line but it wouldn't work how can I put another link on the next line after this one . I also wanted the link to popup in its own window eg. target=blank
[Edited by ericflash on 08-29-2002 at 12:41 AM]

Textfield Html With Link To Frame
if i have a text field rendered as html in flash how can i link to a frame within the flash movie. ie. something like this:
<a href='gotoAndStop(20)'>the link</a>

can it be done? or can text field links only link to normal URL's.

cheers in advance for any help.
thanks
Fozzybear

Var As URL In Html Rendered TextField Link
code:
var itemLink:String = productsNode[i].childNodes[6].firstChild.nodeValue;
var prodPanel = this["productPanel"+i];
prodPanel.itemName_txt.htmlText = "<a href =+itemLink+><B>"+cartArray[i].name+"</B></a>";



how can I pass in the URL from a variable like that?..is it even possible ?

User Created Link In TextField
Hi,

I'm trying to set up an application (in AS3 and Flash) that will allow the user to add text to input TextField, select some text in that field, add a URL to a different input field, THEN, press a button (ie. 'set as link') and have the originally selected text become a link to the URL.

Has this already been addressed somewhere? Anyone have good ideas?

If not, this was my first thought:
(DISCLAIMER - both the swf and code are super ugly. I just set this up for testing)


Code:
import flash.text.*;
import flash.display.*;
import flash.events.*;

var linkInfo
var linkURL
var inIndex
var finalURL
var allText = "this is a link for google. click it"

var style:StyleSheet = new StyleSheet()

var a:Object = new Object()
a.color = "#339933"
style.setStyle("a", a)

inText.styleSheet = style
inText.htmlText = allText
inText.addEventListener(MouseEvent.MOUSE_UP, onSelected)

function onSelected(e:Event){
inIndex = inText.selectionBeginIndex
outIndex = inText.selectionEndIndex
linkInfo = inText.text.slice(inIndex, outIndex)
}
setText.addEventListener(MouseEvent.MOUSE_UP, onSet)

function onSet(e:MouseEvent){
linkURL = linkText.text
finalURL = allText.slice(0, inIndex)+"<a href='http://"
finalURL +=linkURL+"'>"
finalURL +=linkInfo
finalURL +="</a>"+allText.slice(outIndex, inText.length)
inText.htmlText = finalURL
trace(finalURL)
}
all you have to do is select some text in the 'inText' field then add a URL (no http:// needed) then press the button. The inText will change to htmlText with the originally selected text changed color and the text now a link

It works!!

HOOOOWEVER... if the starting text already HAS html code then everything get messed up.
ie if
var allText = "this is a <a href='http://google.com'>link</a> for google. click it"

If you try to select this (once converted to htmlText) the selectionBeginIndex and selectionEndIndex will be wrong.

Any Ideas on how to resolve this?

Image Link Not Working In TextField
Guys, I'm running into a problem assiging a link to image within TextField.

E.g., below is a FLA with two TextField objects. Each has an image pointing to a link. But the link seems to work only if the TextField doesn't have embedded fonts! Any idea what's going on and any suggestions for workarounds? I need to have fonts embedded...

BTW, turns out someone reported this for AS 2.0 as well (it's in the AS 2.0 section), but I didn't find any solutions to that either.

Named Anchor Like Link In Textfield
I'm trying to get links in a textfield that link to paragraphs in that textfield. The same as you would do in html using named anchors.
For now I've an asfunction href in the text that searches the textfields text for a certain substring using indexOf. This gives me a position index of that substring in the text.
Then I use a search for "
" to get the number of lines before the position index is reached. I then use this number of lines value as a scroll value for the textfield. This works but since the textfield is textwrapped I never get the correct amount of lines, because the textfield actually has more lines than it has "
" linebreaks.

Does anybody have an idea how to solve this issue?







Attach Code

var ind = mytext.text.lastIndexOf(mysubstring)
var nbrLines = -1;
var charPos = -1;
var str = mytext.text;
do {
charPos = str.indexOf("
",charPos+1);
nbrLines++;
} while (charPos<=ind);
mytext.scroll=nbrLines

HTML TextField Link To ActionScript?
I haven't worked with HTML TextFields much, and was wondering if this is even possible.

I am working on an events calendar, which when loaded displays a list of the current month's event titles in an HTML TextField. I would like to have these titles be links that when clicked on would call an ActionScript line that would setFocus on the associated date TextField.

Is this possible, or will I have to make each event title into a button?

Here is the work-in-progress so you can see what I cannot explain well
http://jerryscript.hostrocket.com/flash/calendar/

GetURL From An Html Link In A Textfield? Possible?
So I have textField. I would like to use htmlText to execute a gotoAndPlay(); Is this possible? Sort a text = "<a href'gotoAndPlay(1)'>Play This</a> etc...

Thanks for the help!

Link Between Textfield(like QuarkXpress, Illustrator)
hello there

As been doing loads of dtp jobs in the past
i always had the nice function to link textfields and paste a text in.

Now seeminlgy flash doesn't have this.

I've thought on this, if i make an array that will gather the text
how can i gather the information on how much chars are used in that first
textfield so i can link the rest of the text to the second one.

i thought to figure it out by tracing the length of txtfield1 and do maxChars on it but it only works on input fields

anyone has a starter or a good tip? thanks

User Created TextField Link
Hi,

I'm trying to set up an application (in AS3 and Flash) that will allow the user to add text to input TextField, select some text in that field, add a URL to a different input field, THEN, press a button (ie. 'set as link') and have the originally selected text become a link to the URL.

Has this already been addressed somewhere? Anyone have good ideas?

If not, this was my first thought:
(DISCLAIMER - both the swf and code are super ugly. I just set this up for testing)

Code:

import flash.text.*;
import flash.display.*;
import flash.events.*;

var linkInfo
var linkURL
var inIndex
var finalURL
var allText = "this is a link for google. click it"

var style:StyleSheet = new StyleSheet()

var a:Object = new Object()
a.color = "#339933"
style.setStyle("a", a)

inText.styleSheet = style
inText.htmlText = allText
inText.addEventListener(MouseEvent.MOUSE_UP, onSelected)

function onSelected(e:Event){
   inIndex = inText.selectionBeginIndex
   outIndex = inText.selectionEndIndex
   linkInfo = inText.text.slice(inIndex, outIndex)
}
setText.addEventListener(MouseEvent.MOUSE_UP, onSet)

function onSet(e:MouseEvent){
   linkURL = linkText.text
   finalURL = allText.slice(0, inIndex)+"<a href='http://"
   finalURL +=linkURL+"'>"
   finalURL +=linkInfo
   finalURL +="</a>"+allText.slice(outIndex, inText.length)   
   inText.htmlText = finalURL
   trace(finalURL)
}


all you have to do is select some text in the 'inText' field then add a URL (no http:// needed) then press the button. The inText will change to htmlText with the originally selected text changed color and the text now a link

It works!!

HOOOOWEVER... if the starting text already HAS html code then everything get messed up.
ie if
var allText = "this is a <a href='http://google.com'>link</a> for google. click it"

If you try to select this (once converted to htmlText) the selectionBeginIndex and selectionEndIndex will be wrong.

Any Ideas on how to resolve this?

TextField With HTML Link To Actionscipt
Hi,

I have a text field. The content of the text field comes from an external PHP file.
The text, there are links... but I want that the links call a function with parametres in the flash.

the perfect solution should be this but off course it's not possible:
<a href="actionscript:myFunction(3,4);">link</a>

I don't know if there is a solution. With my few knowledge, I don't have an answer. Do you?

Passing Data Form A Textfield To Another Textfield
ok, how can i grab/store information from a specific textfield instance in scene1 and pass it over to another textfield instance in scene2??

need help, its been bugging me for dayz! <:O

Textfield In ScrollPane > Textfield Only Accessible With Clicking Twice
hi!

i have a scrollPane on the stage which contains an editable textfield.
unfortunately i can only access the textfield in the pane when i click on it twice. it seems that the first click goes for the activation of the pane and then comes the textfield.

does anybody have an idea how to solve that problem?


// Text Field
var myTextField:TextField = new TextField();
myTextField.text = "Please insert text";
myTextField.selectable = true;
myTextField.type = TextFieldType.INPUT ;

// ScrollPane
var myScrollPane:ScrollPane = new ScrollPane();
myScrollPane.source = myTextField;
addChild(myScrollPane);

Return TextField From Extended TextField Class
Hi

I'm trying to return a TextField from a class and then display it on stage... but I'm having problem to get it to show up on stage?

Help appreciated!

TFCreator.as:


Code:

import flash.display.*;
import flash.text.*;

public class TFCreator extends TextField
{

// TextField
private var tf:TextField;

// Properties
private var txt:String;
private var instancename:String;
private var color:Number;
private var autosize:String;
private var multilinee:Boolean;
private var wordwrap:Boolean;

// Default TextFormat
private var dfrmt:TextFormat;
private var dfrmt_font:String;
private var dfrmt_color:Number;
private var dfrmt_size:Number;

// External TextFormat
private var efrmt:TextFormat;

public function TFCreator(txt:String = "Text", instancename:String = "Instance", color:Number = 0x333333, autosize:String = "LEFT", multilinee:Boolean = false, wordwrap:Boolean = false, dfrmt_font:String = "Arial", dfrmt_size:Number = 11, dfrmt_color:Number = 0x333333):void
{

// Init Properties
this.txt = txt;
this.instancename = instancename;
this.color = color;
this.autosize = autosize;
this.multilinee = multilinee;
this.wordwrap = wordwrap;

// Init Default Textformat
this.dfrmt_font = dfrmt_font;
this.dfrmt_size = dfrmt_size;
this.dfrmt_color = dfrmt_color;

// Create TextField
createTextfield();

}

private function createTextfield():TextField
{

// New TextField
this.tf = new TextField();

// Set Default TextFormat
setDefaultTextformat();

// Set Properties
this.tf.text = this.txt;
this.tf.name = this.instancename;
this.tf.textColor = this.color;
setAutosize(this.autosize);
setMultiline(this.multilinee);
setWordwrap(this.wordwrap);

trace("Textfield created");

// Add TextField to Displaylist
//addChild(this.tf);
return this.tf;

}

// Getters & Setters......

}
}
and test on timeline:


Code:

import TFCreator;

var ttxt:String = "Halloooo?";

var t1:TFCreator = new TFCreator(ttxt,"inst1",0x666666,"LEFT",false,false,"Arial",13,0x333333);
addChild(t1);
t1.x = 200;
t1.y = 300;
//t1.selectable = false;
t1.setText("Baaaaa");
trace(t1.getText());
//t1.setAutosize("CENTER");
trace(t1.getAutosize());
trace(t1);
getChildByName("inst1");
It seems to work ok it just wont show up on stage.

Html Link In Textfield Using Action Script?
ACTION
#the link is made up in a textfield by the two entries in textfields called "url" and "mask" on submit of a button with the code below#

PROBLEM
why does this code on a button causes the link to appear on the next line in a html textfield called "Comments" and not behind the text already typed in that textfield?

on (release) {
_root.Comments = _root.Comments + "<FONT color='#FF6699'><A HREF = 'http://www."+ _root.url +"' TARGET='_blank'>"+ _root.mask + "</A></FONT>";
_root.url =""
_root.mask = ""
}

Html Textfield --> URL Link Editbox = MAX 128 Characters ?
Hi,

I was thinking if URL's only support up to 128 characters?
I´m using dynamic textfield and it is HTML rendered. And I am linking words inside the textfield to webpages which some of them have up to 126 character url. I am also using an asfunction to send the url address to a specific asfunction. So if we have this url address forexample:

126 character long

http://hubble.mmedia.is/domino/umm/U...1?OpenDocument

and when I add the asfunction to it will be

147 character long

asfunction:_level0.f,http://hubble.mmedia.is/domino/umm/U...1?OpenDocument

Well unfortunately the HTML link editbox only takes up to 128 characters so it would cut the address into

asfunction:_level0.f,http://hubble.mmedia.is/domino/umm/U...ecf4002563f700

As you can see this is what is missing from the URL address

9b9282cce34aecf4002563f700478e71?OpenDocument

Well I will just make an asfunction which receives a variable to search for the correct URL address which I will keep in an array .

The reason why I'm posting this is because the HTML Link Editbox doesn't seem to support a full URL address 128 characters + a description for an asfunction.

That's all...

How To Remove Link Underline In Static Textfield?
Hi,
how can underline be removed from static text field when I type something in URL Link (inside properties panel)?

Losing Focus Because Of Html Link In Textfield
I’m creating an interactive U.S. map that renders specific factory info in popups (all in flash).
I used the drawing api to create the background of the popups and then I dynamically position textfields over them for the content (from xml). The textfield is set to htmlText and has a single link at the bottom of each popup. The problem is associated with the background mc using an onRollOut to hide itself and the textfiled, which works fine until you roll over the html link. Is there any way to prevent the onRollOut event from triggering on that link rollover?
For the time being, I have coded an _alpha=0 hotspot over the html link, but I’m wondering if there is a cleaner way.

edit: maybe this will help - *shrugs*
http://team.mixmedia.com/index.php?t...&c=1&tb=1&pb=1

Link In External File To Update Text In Other Textfield?
hi,

I am trying to create a link in a external text file, that will make a text appear in another textbox on the stage.
ie i have two textbox's on the stage, one called SubMenu one called MainText. Both are filled reading from an external text file. Now I would like to create a hyperlink in the SubMenu textfile that will make a new text appear in the MainText.
Anyone have any idea?

what i have sofar is this (the SubMenu text file):

SubMenu=Galleries
<p><a href="http://www.adamandtheweightfansite.com/NewsText.txt" target="MainText">Gallery 1</a></p>
<p>Gallery 2</p>

MainText or _MainText doesnt make a difference. It keeps opening it in a new browser.
I think that if we can make this work, we will have created a way to update menu's without any flash knowledge.
Any help is greatly appreciated. Oh im using MX Pro

Lisa

HTML TextField Link MouseOver Icon... Ouch
Hey everyone, hope you guys can give me a hand on this one. It's making me insane :P

I'm using HTML text inside a text field. This field is being populated from a database, and the text has some anchor tags in it (<a href="yada.htm">). Everything's fine, I can format the text with CSS and the link works perfectly, but there's one problem that's ruining my nights of sleep: the standard "hand" icon for a link is displayed, and I need to change it to something else. I'm trying to achieve something similar to the Mouse.hide() / startDrag trick, but only for the specific area of this link - basically, replacing the standard HTML link mouseover icon for a custom movieclip.

Any ideas on how this could be done? Is it even possible? Please tell me it is! :P

Best Regards,

Skeptikal

Copyright © 2005-08 www.BigResource.com, All rights reserved