How do I turn strings contained in a variable to numeric/non strings?
For example:
This is what I have:
milk = “hello”;
And I want to turn the “hello” into hello.
milk = “hello”;
milk = hello;
See the difference? So lets say I don’t know what is in milk, but I know it’s a string and I don’t want it to be a string (for example for using it in gotoAndPlay functions to tell instance names). How do I do it?
I don’t understand. If you write _root.milk.anothermc, it means that milk is an mc, right? Not a string. Or maybe you’re meaning that the string contained in milk is the name of the movie clip??
[actiondoer], [thebox] and [circle] are all movie clips inside another movieclip named [boombang] which is on the main stage. Both [insider] movie clips are either inside [thebox] or [circle]. Sorry that you can’t see it here, looks like IE doesn’t support tab spaces. Try quoting my post.
[actiondoer] is where the script is, and I need to tell [insider] to gotoAndPlay somewhere. I’m doing something like this if I know that the target is thebox:
_parent.thebox.insider.gotoAndPlay
But if the instance name is inside a root variable named _root.milk?
If I did something like this:
_root.milk = thebox;
Then this will work:
_parent._root.milk.insider.gotoAndPlay
But if I execute this script from inside [insider]:
_root.milk = _parent._name
Then this won’t work because _root.milk is a string like “thebox”:
_parent._root.milk.insider.gotoAndPlay