# Updating to flash 5 syntax

**URL:** <https://forum.kirupa.com/t/updating-to-flash-5-syntax/5813>\
**Category:** Uncategorized\
**Created:** [September 22, 2002, 8:02pm UTC](https://forum.kirupa.com/t/updating-to-flash-5-syntax/5813 "2002-09-22T20:02:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Uthar](https://avatars.discourse-cdn.com/v4/letter/u/13edae/32.png) [@Uthar](https://forum.kirupa.com/u/Uthar)\
**Post date:** [September 22, 2002, 8:02pm UTC](https://forum.kirupa.com/t/updating-to-flash-5-syntax/5813/1 "2002-09-22T20:02:40Z")

</div>

Hey people,

I’m currently working off of some free source material, and I was having some trouble with it. First of all here’s the code that resides in the \_root of the movie:

In frame 1:

> 

text = “Test text”;  
i = 1;  
max = length(text);  
kerning = “10”;  
size = “10”;  
setProperty (“char”, \_visible, “0”);

In frame 7:

> 

duplicateMovieClip (“char”, “char” add i, i);  
set (“/char” add i add “/letter:char”, substring(text, i, 1));  
setProperty (“/char” add i, \_x, 100+Number(i_kerning));  
setProperty (“/char” add i, \_xscale, 10_size);  
setProperty (“/char” add i, \_yscale, 10\*size);  
i = Number(i)+1;

In frame 8:

> 

if (Number(i)\>Number(max)) {  
stop ();  
} else {  
gotoAndPlay (3);  
}

This is basically one of those text effects which are rather common. The reason I was going to use this method was because once I get it working, I can just change the text I want for any subsequent animation, and if I ever has to expand my project, it won’t be all that hard. This code is going to be placed in a movieclip I named teffect. I never really used Flash 4, and wasn’t sure if /char means \_root.char, and /letter:char means \_root.letter.char ?

So my question boils down to: if I wanted to place this same code in a movieclip named teffect which sat in the root of my movie (\_root.teffect), how would I update it properly for location (incase I’m doing that wrong) and syntax?

Thanks for any help,

Uth

---

<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:** [September 23, 2002, 3:32pm UTC](https://forum.kirupa.com/t/updating-to-flash-5-syntax/5813/2 "2002-09-23T15:32:43Z")

</div>

It’s been a while since I used F4 but from what I remember

/ references root i.e: /MC=\_root.MC  
./ references \_parent i.e: ./MC=\_parent.MC  
…/references \_parent.\_parent i.e: …/MC=\_parent.\_parent.MC

the : refers to a variable

so /MC:var = \_root.MC.var
