# Ilyaslamasse: link into a dynamic text

**URL:** https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769
**Category:** Uncategorized
**Created:** [October 16, 2002, 6:37am UTC](https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769 "2002-10-16T06:37:37Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![corinne](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@corinne](https://forum.kirupa.com/u/corinne)
#### Post date: [October 16, 2002, 6:37am UTC](https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769/1 "2002-10-16T06:37:37Z")

</div>

To continu with our discussion…  
Ref. yesterday.I would like to put a link inside a dynamic text (news.txt) to a frame label (special)???

My frame label (special) is on my timeline (13).  
It’s my dynamic text (news.txt) that is loaded into my mc (news)  
is why I have :  
loadText = new loadVars();  
loadText.load(“textes/news.txt”, “\_root.news”);

I thank you in advance for your time or your file like.

Corinne

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 16, 2002, 12:45pm UTC](https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769/2 "2002-10-16T12:45:20Z")

</div>

Just to say that I’m working on it, and that you shouldn’t have created another thread… :cowboy:

pom 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 16, 2002, 1:05pm UTC](https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769/3 "2002-10-16T13:05:22Z")

</div>

OK, here you go:

I have a text file called _corinneText.txt_ that contains

> &label=special  
> Then in the Flash movie, which is located in the same folder as the text file, I have a first frame with some code in it and another frame later with the label _special_.

This is the code in the first frame:

```php
stop();

/ ***Preparation*** /
_root.createEmptyMovieClip("news",-1);
_root.createTextField("a",0,0,0,200,100 );
a.html=true;

/ ***Loading*** /
loadText = new loadVars();
loadText.onLoad = function() {
		a.htmlText = "<a href='asfunction:gotoAndStop,"+this.label+"'>Go to the frame Special</a>";
};
loadText.load("corinneText.txt", "_root.news");

```

The syntax is the following: asfunction:functionToCall,parameter(s).

Here you call gotoAndStop, with the parameter this.label that comes from your text file.

Cheers. Pom :cowboy:

I think this should be put in the Best of Kirupa, so could you please rate the thread?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 16, 2002, 2:21pm UTC](https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769/4 "2002-10-16T14:21:08Z")

</div>

thank you so munch. You are to cool.  
I don’t know how I it would be possible to do without your precious help.  
I’m going to try now.

I’m sorry for the new thread.  
The rate is on best.

Corinne

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 16, 2002, 2:31pm UTC](https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769/5 "2002-10-16T14:31:56Z")

</div>

this is code excelent!!!  
i have just a question!  
what is the as function that youn use in the code?thanks!!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 16, 2002, 2:51pm UTC](https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769/6 "2002-10-16T14:51:53Z")

</div>

_bowing down_ _back hurting a bit_

Well, ASfunction is -was- undocumented AS, I think, but it should be in the last update of the AS dictionary.

Basically, when you put that in a link, it allows you to call a function when you click a link. You can of course define your own function that will do whatever you want, or call a predefined function like we did here. You can see the syntax in the example.

I’ll probably put that in the AS tricks some day [SIZE=1]when my exams are over… and when Kirupa updates his site…[/SIZE]

pom C:-)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 16, 2002, 3:05pm UTC](https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769/7 "2002-10-16T15:05:56Z")

</div>

nice!!🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 17, 2002, 9:15am UTC](https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769/8 "2002-10-17T09:15:26Z")

</div>

This is what I have done by fallowing your advice:

in my text file “corinneText.txt” I have:

sTextA =KP special  
name of the film  
a href=“special” More info /a  
&label=special

in my flash movie I have on the timeline:  
frame 1 : my movie Clip “news” with a instance name “news”  
frame 13: a frame Label “special”

in my movieclip “news” I have on frame 1:  
a dynamic text with the name “scroller” and a var name"sTextA"  
and a scroller with a Target text field “scroller”  
an action layer:

```php
stop();
/ ***Preparation*** /
_root.createEmptyMovieClip("news",-1);
_root.createTextField("a",0,0,0,200,100 );
a.html=true;

/ ***Loading*** /
loadText = new loadVars();
loadText.onLoad = function() {
        a.htmlText = "<a href='asfunction:gotoAndStop,"+this.label+"'>Go to the frame Special</a>";
		scroller.text = this.sTextA;
		scroller.html = true;
		scroller.htmlText = this.sTextA;
};
loadText.load("corinneText.txt", "_root.news");

```

what is wrong? and where?

Thank’s again and again,  
Corinne

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 17, 2002, 10:54am UTC](https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769/9 "2002-10-17T10:54:09Z")

</div>

> \*Originally posted by corinne \*  
> \*\*in my text file “corinneText.txt” I have:

sTextA =KP special  
name of the film  
a href=“special” More info /a  
&label=special  
\*\*  
Is that what you have in your text file? Just like that? Because it won’t work that way. You have to separate your variables with &. Something like:

> sTextE=KP special&name=name of the film&label=special  
> pom :asian:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 17, 2002, 11:16am UTC](https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769/10 "2002-10-17T11:16:32Z")

</div>

well yes. but it work’s. I added only the tag for the fonts and the colors and the link for each text.  
Because I call the var “sTextA” defined in my flash movie (dynamic text name) all my text are loaded.

Is it ok??

But the link that way is not working  
a href=“special” (with the tag of course)  
What is the correct link beside the &label=special ??

Corinne

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 17, 2002, 1:35pm UTC](https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769/11 "2002-10-17T13:35:44Z")

</div>

I don’t understand. Can you zip the file with the text file and post it here? If it’s too big, mail it at [pom2ter93@hotmail.com](mailto:pom2ter93@hotmail.com)

pom :cyclops:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 18, 2002, 6:23am UTC](https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769/12 "2002-10-18T06:23:52Z")

</div>

I sended to your hotmail address last night.

Corinne

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 18, 2002, 10:41pm UTC](https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769/13 "2002-10-18T22:41:14Z")

</div>

Hum, you mixed up a bit everything… I had made the preparation because I didn’t have the right clips and textfields set up, so you don’t need it.

I had to change the code in the loading too, nothing too important.

The error was in the text file: everything has to be on 1 line, and there should be any space between the variable name and the variable itself.

label=special -\> good  
label =special -\> not good.

Cheers.

pom :cowboy:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 21, 2002, 6:16am UTC](https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769/14 "2002-10-21T06:16:39Z")

</div>

I don’t know how to thank you! You are such a good helper.

What would you advise :  
I absolutly love flash, and want to keep progressing. What training would you advise to improve ?  
Until know my knowledge come by trying stuff. As a graphic designer I develop my concept, I sell to my client and after I look for the “how I’m going to do that”.

Corinne

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 21, 2002, 9:03am UTC](https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769/15 "2002-10-21T09:03:17Z")

</div>

:cowboy: Welcome 🙂

And it depends on what you want to improve: your scripting skills or your design skills…

pom :asian:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 21, 2002, 9:08am UTC](https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769/16 "2002-10-21T09:08:13Z")

</div>

my scripting skills

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 21, 2002, 9:09am UTC](https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769/17 "2002-10-21T09:09:03Z")

</div>

Experimental or just for a site?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 21, 2002, 9:11am UTC](https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769/18 "2002-10-21T09:11:23Z")

</div>

I love to apply what I learned.  
So it will be for sites.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 21, 2002, 9:27am UTC](https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769/19 "2002-10-21T09:27:19Z")

</div>

Well, Keith Peters swears it is a great book: [http://www.friendsofed.com/books/studio/flash\_mx/index.html](http://www.friendsofed.com/books/studio/flash_mx/index.html)  
On the other hand he helped writing it…

And check friends of ed ([http://www.friendsofed.com](http://www.friendsofed.com)) they usually have good stuff.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 21, 2002, 3:26pm UTC](https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769/20 "2002-10-21T15:26:37Z")

</div>

And what if you want to use characters like “ú”, “é” etc?  
because if you would use characters like this, the text would display a square

Andreas

[Next page](https://forum.kirupa.com/t/ilyaslamasse-link-into-a-dynamic-text/6769.md?page=2)
