Flash Q
- Started
- Last post
- 4 Responses
- UndoUndo
ok I have a dynamic test field inside an MC that I want to use with a scrolling function. I want to use the function throughout the site so i am sending it dynamic targets for the .scroll property to work on. Everything is fine when the target is hard coded by when using a dynamic target it starts to fail.
any ideas? code below
_global.myfunc = function(txtName) {
function doScroll(txtName) {
_root[txtName].scroll += 1;
}
doScroll(txtName);
};
this.myButt.onPress = function() {
txtName = "textCon.infoText";
var myVar = setInterval(myfunc, 50, txtName);
};
- UndoUndo0
*bump
- UndoUndo0
anyone.??
- fate_redux0
yeah, when you do the _root[var] method, flash has trouble with multiuple depths. Like a.target.you.want.to.target, it fucks up.
- UndoUndo0
thanks.
the work around we found is
inputString ="myObj.myTxtTarget"
n=eval(inputString )
_root.n.scroll ++
for example
what a F8cken ball ache
:))