# (F5) Need answer fast

**URL:** <https://forum.kirupa.com/t/f5-need-answer-fast/18505>\
**Category:** Uncategorized\
**Created:** [April 17, 2003, 10:14am UTC](https://forum.kirupa.com/t/f5-need-answer-fast/18505 "2003-04-17T10:14:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![phorte](https://avatars.discourse-cdn.com/v4/letter/p/77aa72/32.png) [@phorte](https://forum.kirupa.com/u/phorte)\
**Post date:** [April 17, 2003, 10:14am UTC](https://forum.kirupa.com/t/f5-need-answer-fast/18505/1 "2003-04-17T10:14:23Z")

</div>

Okay… Is there anyway to have a ceratin part of a script make certain values a certain value for only that part of the script and then have the same script later on but have to show different values… that was confusing right?? lol… anyway…

If I have this script

sign1.\_x = 170;  
sign1.\_y = ay;  
sign1.txtmc.txt = \_root.atxt;  
sign1.body.\_width = aw;  
sign1.point.\_x = aw

and i then want to repeat this script but with a chang that all the "1"s are "2"s and all the "a"s are "b"s (atxt become btxt for example)

Im not really sure how to do this… i was think of like having a loop function and everytime it does the script it changes thoose values but then im not so sure how to change a into b… anway…  
Thank you in advance and anyone who helps me this will get a chocolate bar… =D lol…

/Aussie Devil/

---

<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 17, 2003, 10:54am UTC](https://forum.kirupa.com/t/f5-need-answer-fast/18505/2 "2003-04-17T10:54:17Z")

</div>

```auto

startLetter = "a";
startNumber = 1;

char = startLetter.charCodeAt(0);
for (i=0;i<10;i++){
	num = i + startNumber;
	let = String.fromCharCode(i+char);
	this["sign"+num]._x = 170;
	this["sign"+num]._y = this[let+"y"];
	this["sign"+num].txtmc.txt = _root[let+"txt"];
	this["sign"+num].body._width = this[let+"w"];
	this["sign"+num].point._x = this[let+"w"];
}

```

😉

---

<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 17, 2003, 10:54am UTC](https://forum.kirupa.com/t/f5-need-answer-fast/18505/3 "2003-04-17T10:54:30Z")

</div>

there must be an easier way than this… but i don’t feel like thinking right now. 😛

```auto
var i, a = "ab";
for (i=1; i<=a.length; i++) {
	this["sign"+i]._x = 170;
	this["sign"+i]._y = this[a.charAt(i-1)+"y"];
	this["sign"+i].txtmc.txt = this[a.charAt(i-1)+"txt"];
	this["sign"+i].body._width = this[a.charAt(i-1)+"w"];
	this["sign"+i].point._x = this[a.charAt(i-1)+"w"];
}

```

just change **this** to **\_root** or **\_parent** depending on where those variables were defined. 😉

---

<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 17, 2003, 11:57am UTC](https://forum.kirupa.com/t/f5-need-answer-fast/18505/4 "2003-04-17T11:57:55Z")

</div>

hmmm… okay… im not that much of an actionscript expect… so… these scripts a little overwhelming… so… if u dont mind… could u sorta explain whats happening in them…??

like… what exactly is a string?? or how do thoose ; thing work?? or wait… i tried your script senocular although it didnt work… sorry… but then i tried your kax… and it worked… but not tottaly sure exactly how…

thanks for all your work…

EDIT: I was just looking thourgh and i think i sorta get it now… and i only have one thing to say: “you guys are genius’s!!!” That is amazing… i would never of thought of doin that… but now i know about that… and i am learning… good… i wish i was as good as you guys… anyway… Thankyou Thank you Thank you…

/Aussie Devil/

---

<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 17, 2003, 2:11pm UTC](https://forum.kirupa.com/t/f5-need-answer-fast/18505/5 "2003-04-17T14:11:43Z")

</div>

sorry… i had a little problem here and i couldn’t reply before. :-\

anyway, if you still have any questions about the script… just ask, i’ll try to explain 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 17, 2003, 3:20pm UTC](https://forum.kirupa.com/t/f5-need-answer-fast/18505/6 "2003-04-17T15:20:30Z")

</div>

That okay… Its okay… i worked out how it worked… and a think that while, for etc functions can be very usefull… i never would have know about them if u hadnt told me… thanks for that… =D

Thank you once again… and sure if i have anymore questions i will ask u… thanks…

//Scotty//

---

<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 17, 2003, 3:23pm UTC](https://forum.kirupa.com/t/f5-need-answer-fast/18505/7 "2003-04-17T15:23:46Z")

</div>

anytime. =)
