*** Dynamic text ***

This must be something simple… but I dont see the prob ?

the first frame and script works fine. But I the second frame doesn’t.

FIRST FRAME
[AS]
f_pack_amount = 0;
s_pack_amount = 0;
t_pack_amount = 0;
oyster_amount = 0;
chilli_amount = 0;
soya_amount = 0;
wasabi_amount = 0;
sticks_amount = 0;
menus_amount = 0;
//*********************
f_pack_total = 0;
s_pack_total = 0;
t_pack_total = 0;
oyster_total = 0;
chilli_total = 0;
soya_total = 0;
wasabi_total = 0;
del_total = 10.00;
order_total = 0;
//*********************
//*********************
_root.onEnterFrame = function() {

if (isNaN(f_pack_amount)) {f_pack_amount = 0;}
if (isNaN(s_pack_amount)) {s_pack_amount = 0;}
if (isNaN(t_pack_amount)) {t_pack_amount = 0;}
if (isNaN(oyster_amount)) {oyster_amount = 0;}
if (isNaN(chilli_amount)) {chilli_amount = 0;}
if (isNaN(soya_amount )) {soya_amount = 0;}
if (isNaN(wasabi_amount)) {wasabi_amount = 0;}
if (isNaN(sticks_amount)) {sticks_amount = 0;}
if (isNaN(menus_amount )) {menus_amount = 0;}

f_pack_total = f_pack_amount  * 4.00;
s_pack_total = s_pack_amount  * 5.40;
t_pack_total = t_pack_amount  *19.20;
oyster_total = oyster_amount  * .50;
chilli_total = chilli_amount  * .50;
  soya_total = soya_amount    * .50;
wasabi_total = wasabi_amount  * .60;

	  _order = order_total - del_total;

order_total =
f_pack_total +
s_pack_total +
t_pack_total +
oyster_total +
chilli_total +
soya_total +
wasabi_total;

if (order_total - del_total > 20) {del_total = 0;} else{del_total = 10.00}

order_total = (order_total + del_total);

};
[/AS]
SECOND FRAME
[AS]
x_position = 0;

_root.onEnterFrame = function() {

if(f_pack_amount != 0){
//( label | layer | Y | x_position | length | height )
this.createTextField(“f_pack_amount”, 0 , 0 , x_position , 80 , 16 );
f_pack_amount.setNewTextFormat(new TextFormat(“Verdana”, 10));
f_pack_amount.type = “dynamic”;
f_pack_amount.border = true;

    x_position = x_position + 10;}

}
[/AS]

You already have a variable named f_pack_amount. Then you are creating a textfield with that same name. Replace it for f_pack_amount_text. [AS]this.createTextField(“f_pack_amount_text”, 0 , 0 , x_position , 80 , 16 );[/AS]

And the correct sintax for the MovieClip.createTextField method is as follows:
[AS]MovieClip.createTextField(instanceName, depth, x, y, width, height);[/AS]
See? The x parameter is before the y parameter! :stuck_out_tongue: