# Actionscript Text Problem

**URL:** <https://forum.kirupa.com/t/actionscript-text-problem/19377>\
**Category:** flash\
**Created:** [April 27, 2003, 12:14pm UTC](https://forum.kirupa.com/t/actionscript-text-problem/19377 "2003-04-27T12:14:57Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![TOOL](https://avatars.discourse-cdn.com/v4/letter/t/df705f/32.png) [@TOOL](https://forum.kirupa.com/u/TOOL)\
**Post date:** [April 27, 2003, 12:14pm UTC](https://forum.kirupa.com/t/actionscript-text-problem/19377/1 "2003-04-27T12:14:57Z")

</div>

hi actionscript wizards

im trying to achieve this effect but instead of displaying the text i want, it displays a letter over and over…any ideas for what might be wrong?

if it helps i’ll paste the code so let me know

thanks

TOB 🙂

---

<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:** [April 27, 2003, 1:33pm UTC](https://forum.kirupa.com/t/actionscript-text-problem/19377/2 "2003-04-27T13:33:27Z")

</div>

> \*Originally posted by TOOL \*  
> \*\*  
> if it helps i’ll paste the code so let me know  
> \*\*

letting you know 😉

---

<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:** [April 28, 2003, 12:50am UTC](https://forum.kirupa.com/t/actionscript-text-problem/19377/3 "2003-04-28T00:50:17Z")

</div>

ok thought that would help. what i have done so far is download a .fla from flashkit and basically copied the code for what they have done, only with small variations.

the .fla i downloaded can be found [here](http://www.flashkit.com/movies/Effects/Text_Effects/fakhars_-Smooth_C-8399/index.php)

i have a movie clip within a movie clip. the movie clip is what animates the text and the movie clip within the movie clip is just creating the text object.

on a different layer but in the same frame number there is this code:

```php
text = "Jane Brown";
i = 1;
max = length(text);
kerning = "40";
size = "10";
setProperty("text", _visible, "0");

```

then 2 frames later:

```php
duplicateMovieClip("text", "text" add i, i);
set("/text" add i add "/letter:text", substring(text, i, 1));
setProperty("/text" add i, _x, 100+Number(i*kerning));
setProperty("/text" add i, _xscale, 25*size);
setProperty("/text" add i, _yscale, 30*size);
i = Number(i)+1;

```

2 frames later:

```php
if (Number(i)>Number(max)) {
    stop();
} else {
    gotoAndPlay(98);
if (Number(i)>Number(max)) {
    stop();
} else {
    gotoAndPlay(98);
}

```

the movie clip where it animates the text has a stop() action at the end of the last frame but thats pretty much it, thanks in advance 🙂

---

<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:** [April 28, 2003, 2:54am UTC](https://forum.kirupa.com/t/actionscript-text-problem/19377/4 "2003-04-28T02:54:49Z")

</div>

I think that there is at least one peice of code missing. There’s no set property to make the object visible again. That has to be there somewhere.

question though. This is set up to work with Flash 4.0. There are much more simple ways of doing this in Flash5.0 or MX. Do you need to catter to 4.0 plugin users or does it matter to you?

---

<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:** [April 28, 2003, 3:44am UTC](https://forum.kirupa.com/t/actionscript-text-problem/19377/5 "2003-04-28T03:44:41Z")

</div>

no i dont need to cater for 4.0 users. i didnt really even think about the code being old code and as for being able to do it an easier way, i wouldnt know how to do that ☹

i’ve looked back over the original code and i dont think i’ve left out anything…

how would you go about doing it an easier way?

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:** [April 28, 2003, 4:21am UTC](https://forum.kirupa.com/t/actionscript-text-problem/19377/6 "2003-04-28T04:21:23Z")

</div>

and can you discribe the effect as you believe it’s supposed to occur, or provide a link to a working example of the effect?

---

<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:** [April 28, 2003, 4:32am UTC](https://forum.kirupa.com/t/actionscript-text-problem/19377/7 "2003-04-28T04:32:09Z")

</div>

i gave a link in my second post but if you cant be bothered scrolling all the way up there again here it is again: [Text effect](http://www.flashkit.com/movies/Effects/Text_Effects/fakhars_-Smooth_C-8399/index.php)

---

<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:** [April 28, 2003, 6:30am UTC](https://forum.kirupa.com/t/actionscript-text-problem/19377/8 "2003-04-28T06:30:41Z")

</div>

my bad… sorry bout that. 🙂

are there any actions attached to any movie clips?

there has to be more than that, I’m sorry. There is a reference there to frame 98 on what I assume is the main timeline. There is a bunch of scaling and moving of the letters as they come onto the screen. There may even be a Math.sin method referenced for the curve of the movement.

Anyway… I’ll take a look at the fla in the morning.

---

<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:** [April 28, 2003, 12:28pm UTC](https://forum.kirupa.com/t/actionscript-text-problem/19377/9 "2003-04-28T12:28:56Z")

</div>

before you go and spend time looking at the .fla you should know that i have made some modifications…the movie clip within the movieclip which is the text object was changed so that it was dynamic text and its variable was text, in the first movie clip where the animation is carried out, i added “letter” as an instance name for all the frames with the movie clip in it…

im pretty sure thats all the changes i made so now it prints out the correct text but it is all jammed up close together and overlapping. sorry if the changes i made sounds confusing…id really appreciate if someone knew the easier way to do this as david mentioned before, 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:** [April 28, 2003, 12:32pm UTC](https://forum.kirupa.com/t/actionscript-text-problem/19377/10 "2003-04-28T12:32:33Z")

</div>

one other thing to add…it doesn’t animate correctly which is strange :-\

---

<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:** [April 28, 2003, 4:04pm UTC](https://forum.kirupa.com/t/actionscript-text-problem/19377/11 "2003-04-28T16:04:45Z")

</div>

Once again, I will point you to my tutorial and tell you to read it.

[http://www.kirupa.com/developer/actionscript/ascript\_text\_animation.htm](http://www.kirupa.com/developer/actionscript/ascript_text_animation.htm)

This is the same exact effect except mine uses Flash 5 syntax.

Now, make sure that you have all of the instance names correct on the MCs on the stage.

You can send me the fla too. [jedick1@binghamton.edu](mailto:jedick1@binghamton.edu)

[http://www.kirupaforum.com/forums/search.php?s=&action=showresults&searchid=71023&sortby=lastpost&sortorder=descending](http://www.kirupaforum.com/forums/search.php?s=&action=showresults&searchid=71023&sortby=lastpost&sortorder=descending)

---

<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:** [April 29, 2003, 3:06am UTC](https://forum.kirupa.com/t/actionscript-text-problem/19377/12 "2003-04-29T03:06:17Z")

</div>

ok i did everything in your tutorial and all the instance names are right and it is displaying the correct text and even animating, but the letters seem to be getting cut off…why would that be happening? do you still want to see the .fla?

by the way, the reason why it wasn’t animating properly before was because i didnt embed the font i think…

would there be many changes to your flash 5 code Jubba if you were to update it to the Flash MX syntax?

🙂

---

<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:** [April 29, 2003, 5:10pm UTC](https://forum.kirupa.com/t/actionscript-text-problem/19377/13 "2003-04-29T17:10:58Z")

</div>

if you were to do it the Flash MX way, it would only be one frame of code.

yes I would like to see your FLA so I can figure out why its not workin for you.

Yes, not embeding the font would cause it to not animate correctly.

yeah, send the fla to me [jedick1@binghamton.edu](mailto:jedick1@binghamton.edu) and I’ll figure out whats wrong with it…

---

<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:** [April 30, 2003, 12:01am UTC](https://forum.kirupa.com/t/actionscript-text-problem/19377/14 "2003-04-30T00:01:42Z")

</div>

ok i sent the .fla Jubba, thanks for your help 🙂

it’d be interesting to see what the MX code would look like for this but i guess in the end it still produces the desired effect.

---

<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:** [April 30, 2003, 12:04am UTC](https://forum.kirupa.com/t/actionscript-text-problem/19377/15 "2003-04-30T00:04:48Z")

</div>

you have to expand the textbox a little bit. thats why its getting cut off.

if I get a chance I will update the code, but I won’t have time for a while.

---

<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:** [April 30, 2003, 6:46am UTC](https://forum.kirupa.com/t/actionscript-text-problem/19377/16 "2003-04-30T06:46:04Z")

</div>

ok i expanded the text box…and all is good except the spacing between the letters is off a bit…do i have to play around with the value of the kerning variable? if so i have already done that and it hasn’t fixed it…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:** [April 30, 2003, 7:15am UTC](https://forum.kirupa.com/t/actionscript-text-problem/19377/17 "2003-04-30T07:15:37Z")

</div>

Thanks for looking at this Jubba… my week got hectic. (sorry bout that Tool)

---

<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:** [April 30, 2003, 11:33am UTC](https://forum.kirupa.com/t/actionscript-text-problem/19377/18 "2003-04-30T11:33:38Z")

</div>

dont worry david, thanks for offering to look at it though
