You can definitely use a variable there. You might want to step
through the code to make sure that the variable is getting populated
with the correct value and that the timer is being created after the
getRate function completes.
-Mike Chabot
On Mon, Oct 27, 2008 at 4:11 PM, sailorsea21 <[EMAIL PROTECTED]> wrote:
> Hey everyone, I have a value of 30000 stored in a MySQL database.
>
> I call this value and import it in flex via HTTPService (PHP & XML):
>
> <mx:HTTPService url="value.php" method="POST" id="rate"
> useProxy="false" result="getRate(event)"/>
>
> I now have a timer:
> var myTimer:Timer = new Timer(30000);
>
> Can I replace the hard-coded value of "30000" with the value that is
> stored in my database?
>
> This is my script:
>
> [Bindable]
> public var valuesMilliseconds:int;
>
> private function getRate(event:ResultEvent):void
> {
> valuesMilliseconds = event.result.database.row.Refresh_Rate;
> }
>
> I tried the following but it didn't work:
>
> var myTimer:Timer = new Timer(valuesMilliseconds);
>
> Thanks.
>
> -David
>
>