i have many buttons, that do practicly the same, except with a different target. Therefore i want to give them a function.
So far the function is on the _root. and the buttons ask for it like:
[color=blue]_root.gonext(“zh”);[/color]
and the function on the root is:
[color=blue]function gonext(mc){[/color]
[color=blue]targett = “p_” + mc;[/color]
[color=blue]targett.gotoAndStop(“whatever”);[/color]
[color=blue]// plus a lot more[/color]
[color=blue]}[/color]
So the mc called ‘p_zh’ should gotoAndStop at “whatever”, but this doesnt work. AS reads the word targett as the target, not as a variable.
How do i let the function link back to the custom mc?