Undocumented? Maybe you meant "documented"?
http://livedocs.macromedia.com/flash/8/main/00001766.html
<quote>
setInterval function
setInterval(functionReference:Function, interval:Number, [param1:Object,
param2, ..., paramN]) : Number
setInterval(objectReference:Object, methodName:String, interval:Number,
[param1:Object, param2, ..., paramN]) : Number
</quote>
And further down on that page there's a complete example.
And the weatherInterval property should be private.
There is no problem whatsoever with private properties and setInterval.
I use them all the time.
You should consider making the WeatherManager class a Singleton as well.
regards,
Muzak
----- Original Message -----
From: "Cédric Néhémie" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <[email protected]>
Sent: Sunday, November 05, 2006 12:46 PM
Subject: Re: [Flashcoders] OOP advice for game
> Hi Paul,
>
> To resolve the setInterval scope issue you could use the second
> setInterval syntax (undocumented in the Flash doc) :
>
> weatherTimer = setInterval(this, "changeWeather", 5000);
>
>
> About the 80s time limit, if you target your swf to version 8, you could use
> the setTimeout method witch is perfect for that ;)
> (work the same as setInterval).
>
>
> Cdric
>
> Paul Steven wrote:
>> Thanks James, sounds good enough to me and seems to work nicely.
>>
>> Many thanks
>>
>> Paul
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com