RE: [flexcoders] Flex 3 / AIR: Creating a Timer and binding Text
This might help you, I wrote it a while back. http://dale.fraser.id.au/2008/01/poker-blind-timer-flex-version.html View source is enabled on the demo. Regards Dale Fraser <http://learncf.com/> http://learncf.com <http://flexcf.com/> http://flexcf.com From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Steve Good Sent: Thursday, 24 April 2008 1:57 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Flex 3 / AIR: Creating a Timer and binding Text I think I understand, but would love to see an example if you have one. So far I'm really digging working with Flex. -- ~Steve http://lanctr.com/ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Wednesday, April 23, 2008 10:51 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Flex 3 / AIR: Creating a Timer and binding Text Also (gratuitous advice, not related to your problem) , you can use a single HTTPService instance and a single result handler for all calls. Send() returns an AsyncToken, which is a dynamic object that is associated with the specific send call, to which you can add any properties that you want. You can include functions if you want, but I usually just send a couple string parameters, on that indicates an id for the call, and an optional one that indicates special processing. In the result handler, you can access the AsyncToken using event.token, then access the values stored in you properties. I use a switch statement to determine what to do with any given result. So all results are in one place. It makes it easy to chain calls, and to maintain that chain. If you are interested, I can post some sample code. Tracy _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrew D. Goodfellow Sent: Wednesday, April 23, 2008 10:07 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Flex 3 / AIR: Creating a Timer and binding Text Hi Steve, You need a [Bindable] meta tag in front of every property you need to be bindable. You only have it on callID, not callStatus. -Andy On 4/23/08, Steve Good <[EMAIL PROTECTED] <mailto:sgood%40lanctr.com> > wrote: > (I sent this earlier, but it never made it through, so I apologize if it > ends up being a double post) > > > > I'm trying to make a call to a remote script at regular intervals. I can > get it to make the calls, but I can't figure out how to apply a timer to the > second call. I thought I had figured out how to bind the data to a text > object, but I'm not getting any results displayed. Here's a sample of the > code. > > > > http://domain.com/dir/script1.cfm"; > result="getCallID(event)"/> > > url="http://domain.com/dir/script2.cfm"; result="showStatus(event)"/> > > > > > > > > > > > > > > > > > > > > > > > > Also, the mx:text is giving this warning: "Data binding will not be able to > detect assignments to "callStatus"." > > > > Any help is greatly appreciated. > > > > Thanks! > > > > ~Steve > > http://lanctr.com/ > > > > > > > > ~Steve > > http://lanctr.com/ > > > >
RE: [flexcoders] Flex 3 / AIR: Creating a Timer and binding Text
Thanks for the info. Any ideas on setting up a timer, or did I do it right? ~Steve http://lanctr.com From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrew D. Goodfellow Sent: Wednesday, April 23, 2008 9:07 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Flex 3 / AIR: Creating a Timer and binding Text Hi Steve, You need a [Bindable] meta tag in front of every property you need to be bindable. You only have it on callID, not callStatus. -Andy On 4/23/08, Steve Good <[EMAIL PROTECTED] <mailto:sgood%40lanctr.com> > wrote: > (I sent this earlier, but it never made it through, so I apologize if it > ends up being a double post) > > > > I'm trying to make a call to a remote script at regular intervals. I can > get it to make the calls, but I can't figure out how to apply a timer to the > second call. I thought I had figured out how to bind the data to a text > object, but I'm not getting any results displayed. Here's a sample of the > code. > > > > http://domain.com/dir/script1.cfm"; > result="getCallID(event)"/> > > url="http://domain.com/dir/script2.cfm"; result="showStatus(event)"/> > > > > > > > > > > > > > > > > > > > > > > > > Also, the mx:text is giving this warning: "Data binding will not be able to > detect assignments to "callStatus"." > > > > Any help is greatly appreciated. > > > > Thanks! > > > > ~Steve > > http://lanctr.com/ > > > > > > > > ~Steve > > http://lanctr.com/ > > > >
RE: [flexcoders] Flex 3 / AIR: Creating a Timer and binding Text
I think I understand, but would love to see an example if you have one. So far I'm really digging working with Flex. -- ~Steve http://lanctr.com/ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Wednesday, April 23, 2008 10:51 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Flex 3 / AIR: Creating a Timer and binding Text Also (gratuitous advice, not related to your problem) , you can use a single HTTPService instance and a single result handler for all calls. Send() returns an AsyncToken, which is a dynamic object that is associated with the specific send call, to which you can add any properties that you want. You can include functions if you want, but I usually just send a couple string parameters, on that indicates an id for the call, and an optional one that indicates special processing. In the result handler, you can access the AsyncToken using event.token, then access the values stored in you properties. I use a switch statement to determine what to do with any given result. So all results are in one place. It makes it easy to chain calls, and to maintain that chain. If you are interested, I can post some sample code. Tracy _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrew D. Goodfellow Sent: Wednesday, April 23, 2008 10:07 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Flex 3 / AIR: Creating a Timer and binding Text Hi Steve, You need a [Bindable] meta tag in front of every property you need to be bindable. You only have it on callID, not callStatus. -Andy On 4/23/08, Steve Good <[EMAIL PROTECTED] <mailto:sgood%40lanctr.com> > wrote: > (I sent this earlier, but it never made it through, so I apologize if it > ends up being a double post) > > > > I'm trying to make a call to a remote script at regular intervals. I can > get it to make the calls, but I can't figure out how to apply a timer to the > second call. I thought I had figured out how to bind the data to a text > object, but I'm not getting any results displayed. Here's a sample of the > code. > > > > http://domain.com/dir/script1.cfm"; > result="getCallID(event)"/> > > url="http://domain.com/dir/script2.cfm"; result="showStatus(event)"/> > > > > > > > > > > > > > > > > > > > > > > > > Also, the mx:text is giving this warning: "Data binding will not be able to > detect assignments to "callStatus"." > > > > Any help is greatly appreciated. > > > > Thanks! > > > > ~Steve > > http://lanctr.com/ > > > > > > > > ~Steve > > http://lanctr.com/ > > > >
RE: [flexcoders] Flex 3 / AIR: Creating a Timer and binding Text
Also (gratuitous advice, not related to your problem) , you can use a single HTTPService instance and a single result handler for all calls. Send() returns an AsyncToken, which is a dynamic object that is associated with the specific send call, to which you can add any properties that you want. You can include functions if you want, but I usually just send a couple string parameters, on that indicates an id for the call, and an optional one that indicates special processing. In the result handler, you can access the AsyncToken using event.token, then access the values stored in you properties. I use a switch statement to determine what to do with any given result. So all results are in one place. It makes it easy to chain calls, and to maintain that chain. If you are interested, I can post some sample code. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrew D. Goodfellow Sent: Wednesday, April 23, 2008 10:07 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Flex 3 / AIR: Creating a Timer and binding Text Hi Steve, You need a [Bindable] meta tag in front of every property you need to be bindable. You only have it on callID, not callStatus. -Andy On 4/23/08, Steve Good <[EMAIL PROTECTED] <mailto:sgood%40lanctr.com> > wrote: > (I sent this earlier, but it never made it through, so I apologize if it > ends up being a double post) > > > > I'm trying to make a call to a remote script at regular intervals. I can > get it to make the calls, but I can't figure out how to apply a timer to the > second call. I thought I had figured out how to bind the data to a text > object, but I'm not getting any results displayed. Here's a sample of the > code. > > > > http://domain.com/dir/script1.cfm <http://domain.com/dir/script1.cfm> " > result="getCallID(event)"/> > > url="http://domain.com/dir/script2.cfm <http://domain.com/dir/script2.cfm> " result="showStatus(event)"/> > > > > > > > > > > > > > > > > > > > > > > > > Also, the mx:text is giving this warning: "Data binding will not be able to > detect assignments to "callStatus"." > > > > Any help is greatly appreciated. > > > > Thanks! > > > > ~Steve > > http://lanctr.com/ <http://lanctr.com/> > > > > > > > > ~Steve > > http://lanctr.com/ <http://lanctr.com/> > > > >
Re: [flexcoders] Flex 3 / AIR: Creating a Timer and binding Text
Hi Steve, You need a [Bindable] meta tag in front of every property you need to be bindable. You only have it on callID, not callStatus. -Andy On 4/23/08, Steve Good <[EMAIL PROTECTED]> wrote: > (I sent this earlier, but it never made it through, so I apologize if it > ends up being a double post) > > > > I'm trying to make a call to a remote script at regular intervals. I can > get it to make the calls, but I can't figure out how to apply a timer to the > second call. I thought I had figured out how to bind the data to a text > object, but I'm not getting any results displayed. Here's a sample of the > code. > > > > http://domain.com/dir/script1.cfm"; > result="getCallID(event)"/> > >url="http://domain.com/dir/script2.cfm"; result="showStatus(event)"/> > > > > > > > > > > > > > > > > > > > > > > > > Also, the mx:text is giving this warning: "Data binding will not be able to > detect assignments to "callStatus"." > > > > Any help is greatly appreciated. > > > > Thanks! > > > > ~Steve > > http://lanctr.com/ > > > > > > > > ~Steve > > http://lanctr.com/ > > > >
[flexcoders] Flex 3 / AIR: Creating a Timer and binding Text
(I sent this earlier, but it never made it through, so I apologize if it ends up being a double post) I'm trying to make a call to a remote script at regular intervals. I can get it to make the calls, but I can't figure out how to apply a timer to the second call. I thought I had figured out how to bind the data to a text object, but I'm not getting any results displayed. Here's a sample of the code. http://domain.com/dir/script1.cfm"; result="getCallID(event)"/> http://domain.com/dir/script2.cfm"; result="showStatus(event)"/> Also, the mx:text is giving this warning: "Data binding will not be able to detect assignments to "callStatus"." Any help is greatly appreciated. Thanks! ~Steve http://lanctr.com/ ~Steve http://lanctr.com/