This content has been marked as final.
Show 6 replies
-
1. Re: setInterval problem
rlc5611 Apr 4, 2008 11:36 PM (in response to tegnegi)function aa() {
var Obj:Object = new Object();
Obj.xx = "Hi everyone";
interval_id = setInterval(bb, 1000, Obj);
}
function bb(localObj) {
trace(localObj.xx);
}
aa(); -
2. Re: setInterval problem
tegnegi Apr 4, 2008 11:51 PM (in response to rlc5611)Thanx buddy..But my main concern was passing an Object ref as first paramenter and calling the function from the Object's scope...and then tracing the object's properties using this keyword as written in the flash help file...Well here is an excerpt from the help file..
Identify the scope of the function being called.
To identify the scope of the function being called, pass the object where the setInterval() method can execute (the object scope) as the first parameter and the method name you want to execute as the second parameter (as shown in the second signature). This ensures that the desired method is executed from the scope of the object reference passed in. When the method is executed in this manner, it can reference member variables on the object using the this keyword.
Text Text -
3. Re: setInterval problem
rlc5611 Apr 5, 2008 12:06 AM (in response to tegnegi)In your example, "bb" is not a method of your Object. -
4. Re: setInterval problem
tegnegi Apr 5, 2008 12:18 AM (in response to rlc5611)Okay got it ...Thanx buddy -
5. Re: setInterval problem
tegnegi Apr 5, 2008 12:18 AM (in response to rlc5611)Okay got it ...Thanx buddy -
6. Re: setInterval problem
tegnegi Apr 5, 2008 12:18 AM (in response to rlc5611)Okay got it ...Thanx buddy