Or changing the method to like this would work: (notice the
parenthesis)

function test(){
  setInterval(getUser(),3000);
}

--- In flexcoders@yahoogroups.com, "Joshua Garnett"
<[EMAIL PROTECTED]> wrote:
>
> Try calling setInterval like this,  intervalID =
> setInterval(this,"getUser",10000);  Also, in the getUser function
add
> clearInterval(intervalID);
>
> --Josh
>
> On 4/25/06, loveewind <[EMAIL PROTECTED]> wrote:
> >
> > Hi All,
> > I have a piece of code below:
> > <?xml version="1.0" encoding="utf-8"?>
> > <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"
> > initialize="test()">
> >      <mx:RemoteObject id="EJBUserProxy"
> > source="net.wind.proxy.UserProxy" >
> >       <mx:method name="getUserInfo" result="setCurrentUser
> > (event.result)"></mx:method>
> >
> >     </mx:RemoteObject>
> > <mx:Script>
> > <![CDATA[
> >
> > function test(){
> >   setInterval(getUser,10000);
> > }
> > function getUser(){
> > EJBUserProxy.getUserInfo("qaz");
> > }
> > function setCurrentUser(obj){
> > if(obj!=null)
> >   mx.controls.Alert.show("execute");
> > }
> >
> >
> >
> > ]]>
> > </mx:Script>
> > </mx:Application>
> >
> > it seems the setInterval function can't execute remoteobject
method,
> > Who has such experience,wait for your help,
> > Thanks
> >
> >
> >
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives: http://www.mail-archive.com/flexcoders%
40yahoogroups.com
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to