How to simplify this code?

hi guys whats the correct way to simplify this into 1 line?


_root.tutorial-=1;
_root.tutorial+=“t”;

basically i have this variable called tutorial which is a int.
lets say _root.tutorial=4;

I want it to decrease by 1 and then concat a letter ‘t’ to it, thus changing it into a string.

The above code works but when i change it to:


_root.tutorial-=1+“t”;

i get some funny value.

btw just to be sure, flash automatically converts between data types right? if not, how do i convert ints to strs and vice versa?

Int.parseInt(variable); ???
Int.(variable); ???

I need answers!

Thank you=)

i’d try: eval(_root.tut -=1) add “t”;
untested though…

thanks man i’ll try it later:eye:

you can certainly do it in one line but not with a -= or a += operator and not without reusing the variable name

_root.tutorial = _root.tutorial - 1 + “t”;

thanks everyone :smirk:

hey thybalt i was checking out yer liquid design and was wondering what font do u use for your text?

It’s hooch and you can d/l it here
http://www.flashkit.com/fonts/H/hooge-hoogeAut-1200/index.php

cheers :goatee: