# Linking with Dynamic Text & CSS problem

**URL:** <https://forum.kirupa.com/t/linking-with-dynamic-text-css-problem/102063>\
**Category:** Uncategorized\
**Created:** [February 19, 2004, 10:59am UTC](https://forum.kirupa.com/t/linking-with-dynamic-text-css-problem/102063 "2004-02-19T10:59:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![juxtapozed](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@juxtapozed](https://forum.kirupa.com/u/juxtapozed)\
**Post date:** [February 19, 2004, 10:59am UTC](https://forum.kirupa.com/t/linking-with-dynamic-text-css-problem/102063/1 "2004-02-19T10:59:37Z")

</div>

After doing the tutorial on kirupa for using css, I wanted to create text links to other frames in my movie. So I searched the forums and came across kode’s really helpful info on creating them. But when i try to incorporate the two i just cant seem to pull it off.

Basically i’m trying to attach a css to the below code, but due to my action script skills fail.

Text Links Code:  
[COLOR=royalblue]\_root.myText.htmlText = ‘\<a href=“asfunction:gotoAndStop,myFrame”\>Click here and goto my frame\</a\>’;[/COLOR]

CSS code:  
[COLOR=royalblue]var format = new TextField.StyleSheet();  
var path = “[http://www.juxtapozed.com/testing/personal/juxtstyle.css](http://www.juxtapozed.com/testing/personal/juxtstyle.css)”;  
var quick = “\<h3\>This is s test.\</h3\>\<p\>This is s test\<br\>This is s testThis is s testThis is s test\</p\>\<h4\>Click here to see This is s test.\<h4\>”  
format.load(path);  
format.onLoad = function(success) {  
if (success) {  
output.styleSheet = format;  
output.text = quick;  
} else {  
output.text = “Error loading CSS file!”;  
}  
};[/COLOR]

any help will be much appreciated . juxatpozed.

---

<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:** [February 19, 2004, 3:26pm UTC](https://forum.kirupa.com/t/linking-with-dynamic-text-css-problem/102063/2 "2004-02-19T15:26:42Z")

</div>

hey juxtapozed

maybe try this:

//declare a function (textLink) in your flash movie like so

\_global.textLink = function() {  
\_root.gotoAndStop(“myLabel”)

}

//then call to this function using the asfunction in your htmlText  
\<a href=‘asfunction:textLink’\>\<b\>text link\</b\>\</a\>

cheers!

jdean

---

<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:** [February 19, 2004, 4:25pm UTC](https://forum.kirupa.com/t/linking-with-dynamic-text-css-problem/102063/3 "2004-02-19T16:25:04Z")

</div>

Welcome to kirupaForum, juxtapozed! 🙂

You have to HTML enable the text field (you can do this via the [font=courier new]TextField.html[/font] property, or selecting “Render text as HTML” in the Properties panel), and assign the HTML formatted text to the text field through the [font=courier new]TextField.htmlText[/font] property. 😉

Try this:

```auto
format.onLoad = function(success) {
if (success) {
output.html = true;
output.styleSheet = format;
output.htmlText = quick;
} else {
output.text = "Error loading CSS file!";
}
};

```

---

<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:** [February 19, 2004, 4:33pm UTC](https://forum.kirupa.com/t/linking-with-dynamic-text-css-problem/102063/4 "2004-02-19T16:33:07Z")

</div>

Thanks guys, sorted, much appreciated!

---

<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:** [February 19, 2004, 4:33pm UTC](https://forum.kirupa.com/t/linking-with-dynamic-text-css-problem/102063/5 "2004-02-19T16:33:54Z")

</div>

No problem. 😛

…By the way, please use the ActionScript tag [**AS][**/AS] to display your code next time. 🙂
