Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
Perfect! Thanks again :) From: Tracy Spratt To: flexcoders@yahoogroups.com Sent: Monday, February 16, 2009 3:54:22 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Search the archives for; addChild reference array One example: _aChildren["one"] = tiletest.addChild( moduleloader) ; Tracy Spratt Lariat Services Flex development bandwidth available From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of - - Sent: Monday, February 16, 2009 2:20 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi tracy, where can I find some docs on taking references from childs? Thanks. From:Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Monday, February 16, 2009 12:20:05 AM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. “…set their IDs…” That does not work in actionscript, only in mxml. You need to take the reference from addChild, and put in your array. Tracy Spratt Lariat Services Flex development bandwidth available From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of - - Sent: Sunday, February 15, 2009 4:04 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi Tracy, I have a little more complicated situation... My linkButtons are now created with actionScript (addChild). I set their IDs before adding them to their parent. My action script also fills up my Array of linkButton IDs called "buttons". [Bindable] privatevar buttons:Array = new Array(); foreach (var itemsIDs:String in buttons) { trace(itemsIDs); this[itemsIDs].setStyle ("styleName","linkButton"); } My trace properly returns all the IDs of my buttons but I get the following error: Property test001 not found... and there is no default value. It's like I don't have access to the ID of my linkButtons because they were created via the ADDCHILD ??? Is this possible? Any ideas how I can get around this? Thanks again :) -David From:Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Friday, February 13, 2009 5:49:57 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. styleName is not a property, it is a style. You have to use setStyle(); Also, debug your loop, make sure you have a good refrence to the button. Tracy Spratt Lariat Services Flex development bandwidth available _ _ _ _ From: flexcod...@yahoogro ups.com [mailto:flexcod...@yahoogro ups.com] On Behalf Of - - Sent: Friday, February 13, 2009 5:31 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi Tracy, I can get it to work as a var, but when I try to access the Array, I get: Cannot access a property or method of a null object reference. This is my array: [Bindable] private var buttons:Array = new Array("test001" , "test002", "test003"); for each(var target:String in buttons) { this[target] .styleName = linkButton; } Thanks again! :) _ _ _ _ From: Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Friday, February 13, 2009 5:15:22 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Yes, sailorsea, see that link. Also, be careful of terminology. I said "store references". This is not the same as storing "IDs". You can do this using ids, with bracket notation. var sId:String = "test001"; this[sId].setStyle( ); //should work Tracy Spratt Lariat Services Flex development bandwidth available _ _ _ _ From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Ryan Graham Sent: Friday, February 13, 2009 5:08 PM To: flexcod...@yahoogro ups.com Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hey now, you knew this was in the docs... :D http://livedocs. adobe.com/ flex/3/html/ help.html? content=03_ Language_ and_Syntax_ 16.html HTH, Ryan From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of - - Sent: Friday, February 13, 2009 2:28 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi Tracy, I created an array of all the IDs of my linkButtons, can you show me an example how to loop in the array? Thanks. _ _ _____ _ From: Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Friday, February 13, 2009 4:11:05 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Store references to each in an Array, then loop over the array. Tracy Spratt Lariat Services Flex development bandwidth available _ _ _ _ From: flexcod...@yahoogro u
RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
Search the archives for; addChild reference array One example: _aChildren["one"] = tiletest.addChild(moduleloader); Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of - - Sent: Monday, February 16, 2009 2:20 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi tracy, where can I find some docs on taking references from childs? Thanks. From: Tracy Spratt To: flexcoders@yahoogroups.com Sent: Monday, February 16, 2009 12:20:05 AM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. "...set their IDs..." That does not work in actionscript, only in mxml. You need to take the reference from addChild, and put in your array. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcod...@yahoogro ups.com <http://ups.com/> [mailto:flexcoders@ yahoogroups. com] On Behalf Of - - Sent: Sunday, February 15, 2009 4:04 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi Tracy, I have a little more complicated situation... My linkButtons are now created with actionScript (addChild). I set their IDs before adding them to their parent. My action script also fills up my Array of linkButton IDs called "buttons". [Bindable] private var buttons:Array = new Array(); for each (var itemsIDs:String in buttons) { trace(itemsIDs); this[itemsIDs].setStyle ("styleName","linkButton"); } My trace properly returns all the IDs of my buttons but I get the following error: Property test001 not found... and there is no default value. It's like I don't have access to the ID of my linkButtons because they were created via the ADDCHILD ??? Is this possible? Any ideas how I can get around this? Thanks again :) -David From: Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Friday, February 13, 2009 5:49:57 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. styleName is not a property, it is a style. You have to use setStyle(); Also, debug your loop, make sure you have a good refrence to the button. Tracy Spratt Lariat Services Flex development bandwidth available _ _ _ _ From: flexcod...@yahoogro ups.com <mailto:flexcoders%40yahoogroups.com> [mailto:flexcod...@yahoogro ups.com <mailto:flexcoders%40yahoogroups.com> ] On Behalf Of - - Sent: Friday, February 13, 2009 5:31 PM To: flexcod...@yahoogro ups.com <mailto:flexcoders%40yahoogroups.com> Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi Tracy, I can get it to work as a var, but when I try to access the Array, I get: Cannot access a property or method of a null object reference. This is my array: [Bindable] private var buttons:Array = new Array("test001" , "test002", "test003"); for each(var target:String in buttons) { this[target] .styleName = linkButton; } Thanks again! :) _ _ _ _ From: Tracy Spratt mailto:tspratt%40lariatinc.com> > To: flexcod...@yahoogro ups.com <mailto:flexcoders%40yahoogroups.com> Sent: Friday, February 13, 2009 5:15:22 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Yes, sailorsea, see that link. Also, be careful of terminology. I said "store references". This is not the same as storing "IDs". You can do this using ids, with bracket notation. var sId:String = "test001"; this[sId].setStyle( ); //should work Tracy Spratt Lariat Services Flex development bandwidth available _ _ _ _ From: flexcod...@yahoogro ups.com <http://ups.com/> [mailto:flexcoders@ yahoogroups. com] On Behalf Of Ryan Graham Sent: Friday, February 13, 2009 5:08 PM To: flexcod...@yahoogro ups.com Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hey now, you knew this was in the docs... :D http://livedocs. <http://livedocs./> adobe.com/ flex/3/html/ help.html? content=03_ Language_ and_Syntax_ 16.html HTH, Ryan From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of - - Sent: Friday, February 13, 2009 2:28 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi Tracy, I created an array of all the IDs of my linkButtons, can you show me an example how to loop in the array? Thanks. ____ _ _ _ _ From: Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Friday, February 13, 2009 4:11:05 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Store references to each in an Array, then loop over the array. Tracy Spratt La
Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
Hi tracy, where can I find some docs on taking references from childs? Thanks. From: Tracy Spratt To: flexcoders@yahoogroups.com Sent: Monday, February 16, 2009 12:20:05 AM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. “…set their IDs…” That does not work in actionscript, only in mxml. You need to take the reference from addChild, and put in your array. Tracy Spratt Lariat Services Flex development bandwidth available From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of - - Sent: Sunday, February 15, 2009 4:04 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi Tracy, I have a little more complicated situation... My linkButtons are now created with actionScript (addChild). I set their IDs before adding them to their parent. My action script also fills up my Array of linkButton IDs called "buttons". [Bindable] privatevar buttons:Array = new Array(); foreach (var itemsIDs:String in buttons) { trace(itemsIDs); this[itemsIDs].setStyle ("styleName","linkButton"); } My trace properly returns all the IDs of my buttons but I get the following error: Property test001 not found... and there is no default value. It's like I don't have access to the ID of my linkButtons because they were created via the ADDCHILD ??? Is this possible? Any ideas how I can get around this? Thanks again :) -David From:Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Friday, February 13, 2009 5:49:57 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. styleName is not a property, it is a style. You have to use setStyle(); Also, debug your loop, make sure you have a good refrence to the button. Tracy Spratt Lariat Services Flex development bandwidth available _ _ _ _ From: flexcod...@yahoogro ups.com [mailto:flexcod...@yahoogro ups.com] On Behalf Of - - Sent: Friday, February 13, 2009 5:31 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi Tracy, I can get it to work as a var, but when I try to access the Array, I get: Cannot access a property or method of a null object reference. This is my array: [Bindable] private var buttons:Array = new Array("test001" , "test002", "test003"); for each(var target:String in buttons) { this[target] .styleName = linkButton; } Thanks again! :) _ _ _ _ From: Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Friday, February 13, 2009 5:15:22 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Yes, sailorsea, see that link. Also, be careful of terminology. I said "store references". This is not the same as storing "IDs". You can do this using ids, with bracket notation. var sId:String = "test001"; this[sId].setStyle( ); //should work Tracy Spratt Lariat Services Flex development bandwidth available _ _ _ _ From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Ryan Graham Sent: Friday, February 13, 2009 5:08 PM To: flexcod...@yahoogro ups.com Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hey now, you knew this was in the docs... :D http://livedocs. adobe.com/ flex/3/html/ help.html? content=03_ Language_ and_Syntax_ 16.html HTH, Ryan From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of - - Sent: Friday, February 13, 2009 2:28 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi Tracy, I created an array of all the IDs of my linkButtons, can you show me an example how to loop in the array? Thanks. _ _ _ _ From: Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Friday, February 13, 2009 4:11:05 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Store references to each in an Array, then loop over the array. Tracy Spratt Lariat Services Flex development bandwidth available _ _ _ _ From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of sailorsea21 Sent: Friday, February 13, 2009 4:01 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] DYNAMIC LINKBUTTONS styleNames. I have a series of 3 linkButtons. I am able to switch the styleName of a linkButton when I click on it as follows: [Bindable] private var linkButton:String = 'linkButton' ; [Bindable] private var linkButtonOff: String = 'linkButtonOff' ; private function setType(result: Event):void { result.currentTarge t.styleName = linkButtonOff; } How can I automatically reset all the other linkButtons styleNames to "{linkButton} " when
RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
"...set their IDs..." That does not work in actionscript, only in mxml. You need to take the reference from addChild, and put in your array. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of - - Sent: Sunday, February 15, 2009 4:04 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi Tracy, I have a little more complicated situation... My linkButtons are now created with actionScript (addChild). I set their IDs before adding them to their parent. My action script also fills up my Array of linkButton IDs called "buttons". [Bindable] private var buttons:Array = new Array(); for each (var itemsIDs:String in buttons) { trace(itemsIDs); this[itemsIDs].setStyle("styleName","linkButton"); } My trace properly returns all the IDs of my buttons but I get the following error: Property test001 not found... and there is no default value. It's like I don't have access to the ID of my linkButtons because they were created via the ADDCHILD ??? Is this possible? Any ideas how I can get around this? Thanks again :) -David From: Tracy Spratt To: flexcoders@yahoogroups.com Sent: Friday, February 13, 2009 5:49:57 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. styleName is not a property, it is a style. You have to use setStyle(); Also, debug your loop, make sure you have a good refrence to the button. Tracy Spratt Lariat Services Flex development bandwidth available _ _ _ _ From: flexcod...@yahoogro ups.com <mailto:flexcoders%40yahoogroups.com> [mailto:flexcod...@yahoogro ups.com <mailto:flexcoders%40yahoogroups.com> ] On Behalf Of - - Sent: Friday, February 13, 2009 5:31 PM To: flexcod...@yahoogro ups.com <mailto:flexcoders%40yahoogroups.com> Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi Tracy, I can get it to work as a var, but when I try to access the Array, I get: Cannot access a property or method of a null object reference. This is my array: [Bindable] private var buttons:Array = new Array("test001" , "test002", "test003"); for each(var target:String in buttons) { this[target] .styleName = linkButton; } Thanks again! :) _ _ _ _ From: Tracy Spratt mailto:tspratt%40lariatinc.com> > To: flexcod...@yahoogro ups.com <mailto:flexcoders%40yahoogroups.com> Sent: Friday, February 13, 2009 5:15:22 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Yes, sailorsea, see that link. Also, be careful of terminology. I said "store references". This is not the same as storing "IDs". You can do this using ids, with bracket notation. var sId:String = "test001"; this[sId].setStyle( ); //should work Tracy Spratt Lariat Services Flex development bandwidth available _ _ _ _ From: flexcod...@yahoogro ups.com <http://ups.com/> [mailto:flexcoders@ yahoogroups. com] On Behalf Of Ryan Graham Sent: Friday, February 13, 2009 5:08 PM To: flexcod...@yahoogro ups.com Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hey now, you knew this was in the docs... :D http://livedocs. <http://livedocs./> adobe.com/ flex/3/html/ help.html? content=03_ Language_ and_Syntax_ 16.html HTH, Ryan From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of - - Sent: Friday, February 13, 2009 2:28 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi Tracy, I created an array of all the IDs of my linkButtons, can you show me an example how to loop in the array? Thanks. ____ _____ _ _ _ From: Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Friday, February 13, 2009 4:11:05 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Store references to each in an Array, then loop over the array. Tracy Spratt Lariat Services Flex development bandwidth available _ _ _ _ From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of sailorsea21 Sent: Friday, February 13, 2009 4:01 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] DYNAMIC LINKBUTTONS styleNames. I have a series of 3 linkButtons. I am able to switch the styleName of a linkButton when I click on it as follows: [Bindable] private var linkButton:String = 'linkButton' ; [Bindable] private var linkButtonOff: String = 'linkButtonOff' ; private function setType(result: Event):void { result.currentTarge t.styleName = linkButtonOff; } How can I automatically reset all the other linkButtons styleNames to
Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
Hi Tracy, I have a little more complicated situation... My linkButtons are now created with actionScript (addChild). I set their IDs before adding them to their parent. My action script also fills up my Array of linkButton IDs called "buttons". [Bindable]privatevarbuttons:Array = newArray(); { }foreach(varitemsIDs:String inbuttons)trace(itemsIDs);this[itemsIDs].setStyle("styleName","linkButton"); My trace properly returns all the IDs of my buttons but I get the following error: Property test001 not found... and there is no default value. It's like I don't have access to the ID of my linkButtons because they were created via the ADDCHILD ??? Is this possible? Any ideas how I can get around this? Thanks again :) -David From: Tracy Spratt To: flexcoders@yahoogroups.com Sent: Friday, February 13, 2009 5:49:57 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. styleName is not a property, it is a style. You have to use setStyle(); Also, debug your loop, make sure you have a good refrence to the button. Tracy Spratt Lariat Services Flex development bandwidth available _ _ _ _ From: flexcod...@yahoogro ups.com [mailto:flexcod...@yahoogro ups.com] On Behalf Of - - Sent: Friday, February 13, 2009 5:31 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi Tracy, I can get it to work as a var, but when I try to access the Array, I get: Cannot access a property or method of a null object reference. This is my array: [Bindable] private var buttons:Array = new Array("test001" , "test002", "test003"); for each(var target:String in buttons) { this[target] .styleName = linkButton; } Thanks again! :) _ _ _ _ From: Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Friday, February 13, 2009 5:15:22 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Yes, sailorsea, see that link. Also, be careful of terminology. I said "store references". This is not the same as storing "IDs". You can do this using ids, with bracket notation. var sId:String = "test001"; this[sId].setStyle( ); //should work Tracy Spratt Lariat Services Flex development bandwidth available _ _ _ _ From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Ryan Graham Sent: Friday, February 13, 2009 5:08 PM To: flexcod...@yahoogro ups.com Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hey now, you knew this was in the docs... :D http://livedocs. adobe.com/ flex/3/html/ help.html? content=03_ Language_ and_Syntax_ 16.html HTH, Ryan From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of - - Sent: Friday, February 13, 2009 2:28 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi Tracy, I created an array of all the IDs of my linkButtons, can you show me an example how to loop in the array? Thanks. _ _ _ _ From: Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Friday, February 13, 2009 4:11:05 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Store references to each in an Array, then loop over the array. Tracy Spratt Lariat Services Flex development bandwidth available _ _ _ _ From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of sailorsea21 Sent: Friday, February 13, 2009 4:01 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] DYNAMIC LINKBUTTONS styleNames. I have a series of 3 linkButtons. I am able to switch the styleName of a linkButton when I click on it as follows: [Bindable] private var linkButton:String = 'linkButton' ; [Bindable] private var linkButtonOff: String = 'linkButtonOff' ; private function setType(result: Event):void { result.currentTarge t.styleName = linkButtonOff; } How can I automatically reset all the other linkButtons styleNames to "{linkButton} " when a linkButton is clicked? Thank you. This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.
Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
Thank you very much Tracy it worked :) -David From: Tracy Spratt To: flexcoders@yahoogroups.com Sent: Friday, February 13, 2009 5:49:57 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. styleName is not a property, it is a style. You have to use setStyle(); Also, debug your loop, make sure you have a good refrence to the button. Tracy Spratt Lariat Services Flex development bandwidth available _ _ _ _ From: flexcod...@yahoogro ups.com [mailto:flexcod...@yahoogro ups.com] On Behalf Of - - Sent: Friday, February 13, 2009 5:31 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi Tracy, I can get it to work as a var, but when I try to access the Array, I get: Cannot access a property or method of a null object reference. This is my array: [Bindable] private var buttons:Array = new Array("test001" , "test002", "test003"); for each(var target:String in buttons) { this[target] .styleName = linkButton; } Thanks again! :) _ _ _ _ From: Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Friday, February 13, 2009 5:15:22 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Yes, sailorsea, see that link. Also, be careful of terminology. I said "store references". This is not the same as storing "IDs". You can do this using ids, with bracket notation. var sId:String = "test001"; this[sId].setStyle( ); //should work Tracy Spratt Lariat Services Flex development bandwidth available _ _ _ _ From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Ryan Graham Sent: Friday, February 13, 2009 5:08 PM To: flexcod...@yahoogro ups.com Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hey now, you knew this was in the docs... :D http://livedocs. adobe.com/ flex/3/html/ help.html? content=03_ Language_ and_Syntax_ 16.html HTH, Ryan From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of - - Sent: Friday, February 13, 2009 2:28 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi Tracy, I created an array of all the IDs of my linkButtons, can you show me an example how to loop in the array? Thanks. _ _ _ _ From: Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Friday, February 13, 2009 4:11:05 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Store references to each in an Array, then loop over the array. Tracy Spratt Lariat Services Flex development bandwidth available _ _ _ _ From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of sailorsea21 Sent: Friday, February 13, 2009 4:01 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] DYNAMIC LINKBUTTONS styleNames. I have a series of 3 linkButtons. I am able to switch the styleName of a linkButton when I click on it as follows: [Bindable] private var linkButton:String = 'linkButton' ; [Bindable] private var linkButtonOff: String = 'linkButtonOff' ; private function setType(result: Event):void { result.currentTarge t.styleName = linkButtonOff; } How can I automatically reset all the other linkButtons styleNames to "{linkButton} " when a linkButton is clicked? Thank you. This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.
RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
styleName is not a property, it is a style. You have to use setStyle(); Also, debug your loop, make sure you have a good refrence to the button. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of - - Sent: Friday, February 13, 2009 5:31 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi Tracy, I can get it to work as a var, but when I try to access the Array, I get: Cannot access a property or method of a null object reference. This is my array: [Bindable] private var buttons:Array = new Array("test001", "test002", "test003"); for each(var target:String in buttons) { this[target].styleName = linkButton; } Thanks again! :) From: Tracy Spratt To: flexcoders@yahoogroups.com Sent: Friday, February 13, 2009 5:15:22 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Yes, sailorsea, see that link. Also, be careful of terminology. I said "store references". This is not the same as storing "IDs". You can do this using ids, with bracket notation. var sId:String = "test001"; this[sId].setStyle( ); //should work Tracy Spratt Lariat Services Flex development bandwidth available From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Ryan Graham Sent: Friday, February 13, 2009 5:08 PM To: flexcod...@yahoogro ups.com Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hey now, you knew this was in the docs... :D http://livedocs. adobe.com/ flex/3/html/ help.html? content=03_ Language_ and_Syntax_ 16.html HTH, Ryan From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of - - Sent: Friday, February 13, 2009 2:28 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi Tracy, I created an array of all the IDs of my linkButtons, can you show me an example how to loop in the array? Thanks. From: Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Friday, February 13, 2009 4:11:05 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Store references to each in an Array, then loop over the array. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of sailorsea21 Sent: Friday, February 13, 2009 4:01 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] DYNAMIC LINKBUTTONS styleNames. I have a series of 3 linkButtons. I am able to switch the styleName of a linkButton when I click on it as follows: [Bindable] private var linkButton:String = 'linkButton' ; [Bindable] private var linkButtonOff: String = 'linkButtonOff' ; private function setType(result: Event):void { result.currentTarge t.styleName = linkButtonOff; } How can I automatically reset all the other linkButtons styleNames to "{linkButton} " when a linkButton is clicked? Thank you. This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.
Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
Hi Tracy, I can get it to work as a var, but when I try to access the Array, I get:Cannot access a property or method of a null object reference. This is my array: [Bindable]private { } Thanks again! :)foreach(vartarget:String inbuttons)this[target].styleName = linkButton; varbuttons:Array = newArray("test001", "test002", "test003"); From: Tracy Spratt To: flexcoders@yahoogroups.com Sent: Friday, February 13, 2009 5:15:22 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Yes, sailorsea, see that link. Also, be careful of terminology. I said “store references”. This is not the same as storing “IDs”. You can do this using ids, with bracket notation. var sId:String = “test001”; this[sId].setStyle( ); //should work Tracy Spratt Lariat Services Flex development bandwidth available From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Ryan Graham Sent: Friday, February 13, 2009 5:08 PM To: flexcod...@yahoogro ups.com Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hey now, you knew this was in the docs… :D http://livedocs. adobe.com/ flex/3/html/ help.html? content=03_ Language_ and_Syntax_ 16.html HTH, Ryan From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of - - Sent: Friday, February 13, 2009 2:28 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi Tracy, I created an array of all the IDs of my linkButtons, can you show me an example how to loop in the array? Thanks. From:Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Friday, February 13, 2009 4:11:05 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Store references to each in an Array, then loop over the array. Tracy Spratt Lariat Services Flex development bandwidth available From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of sailorsea21 Sent: Friday, February 13, 2009 4:01 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] DYNAMIC LINKBUTTONS styleNames. I have a series of 3 linkButtons. I am able to switch the styleName of a linkButton when I click on it as follows: [Bindable] private var linkButton:String = 'linkButton' ; [Bindable] private var linkButtonOff: String = 'linkButtonOff' ; private function setType(result: Event):void { result.currentTarge t.styleName = linkButtonOff; } How can I automatically reset all the other linkButtons styleNames to "{linkButton} " when a linkButton is clicked? Thank you. This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.
Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
Hi Ryan, thanks :) I knew that... :) but the problem I'm having is that the values in my array are Strings. so the following gives me an error... The values are the IDs of the linkButtons that I would like to target [Bindable]privatevarbuttons:Array = newArray("test001", "test002", "test003"); { I get the following error: Cannot create property styleName on String. I understand the problem but I don't know how to set my array to object or IDs ??? Thanks for your help! -David From: Ryan Graham To: flexcoders@yahoogroups.com Sent: Friday, February 13, 2009 5:08:17 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hey now, you knew this was in the docs… :D http://livedocs. adobe.com/ flex/3/html/ help.html? content=03_ Language_ and_Syntax_ 16.html HTH, Ryan From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of - - Sent: Friday, February 13, 2009 2:28 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi Tracy, I created an array of all the IDs of my linkButtons, can you show me an example how to loop in the array? Thanks. From:Tracy Spratt To: flexcod...@yahoogro ups.com Sent: Friday, February 13, 2009 4:11:05 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Store references to each in an Array, then loop over the array. Tracy Spratt Lariat Services Flex development bandwidth available From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of sailorsea21 Sent: Friday, February 13, 2009 4:01 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] DYNAMIC LINKBUTTONS styleNames. I have a series of 3 linkButtons. I am able to switch the styleName of a linkButton when I click on it as follows: [Bindable] private var linkButton:String = 'linkButton' ; [Bindable] private var linkButtonOff: String = 'linkButtonOff' ; private function setType(result: Event):void { result.currentTarge t.styleName = linkButtonOff; } How can I automatically reset all the other linkButtons styleNames to "{linkButton} " when a linkButton is clicked? Thank you. This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system. foreach(varbutton inbuttons) button.styleName = linkButton; }
RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
Yes, sailorsea, see that link. Also, be careful of terminology. I said "store references". This is not the same as storing "IDs". You can do this using ids, with bracket notation. var sId:String = "test001"; this[sId].setStyle(); //should work Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Ryan Graham Sent: Friday, February 13, 2009 5:08 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hey now, you knew this was in the docs... :D http://livedocs.adobe.com/flex/3/html/help.html?content=03_Language_and_ Syntax_16.html <http://livedocs.adobe.com/flex/3/html/help.html?content=03_Language_and _Syntax_16.html> HTH, Ryan From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of - - Sent: Friday, February 13, 2009 2:28 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi Tracy, I created an array of all the IDs of my linkButtons, can you show me an example how to loop in the array? Thanks. From: Tracy Spratt To: flexcoders@yahoogroups.com Sent: Friday, February 13, 2009 4:11:05 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Store references to each in an Array, then loop over the array. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcod...@yahoogro ups.com <http://ups.com/> [mailto:flexcoders@ yahoogroups. com] On Behalf Of sailorsea21 Sent: Friday, February 13, 2009 4:01 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] DYNAMIC LINKBUTTONS styleNames. I have a series of 3 linkButtons. I am able to switch the styleName of a linkButton when I click on it as follows: [Bindable] private var linkButton:String = 'linkButton' ; [Bindable] private var linkButtonOff: String = 'linkButtonOff' ; private function setType(result: Event):void { result.currentTarge t.styleName = linkButtonOff; } How can I automatically reset all the other linkButtons styleNames to "{linkButton} " when a linkButton is clicked? Thank you. This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.
RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
Hey now, you knew this was in the docs... :D http://livedocs.adobe.com/flex/3/html/help.html?content=03_Language_and_ Syntax_16.html HTH, Ryan From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of - - Sent: Friday, February 13, 2009 2:28 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Hi Tracy, I created an array of all the IDs of my linkButtons, can you show me an example how to loop in the array? Thanks. From: Tracy Spratt To: flexcoders@yahoogroups.com Sent: Friday, February 13, 2009 4:11:05 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Store references to each in an Array, then loop over the array. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcod...@yahoogro ups.com <http://ups.com/> [mailto:flexcoders@ yahoogroups. com] On Behalf Of sailorsea21 Sent: Friday, February 13, 2009 4:01 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] DYNAMIC LINKBUTTONS styleNames. I have a series of 3 linkButtons. I am able to switch the styleName of a linkButton when I click on it as follows: [Bindable] private var linkButton:String = 'linkButton' ; [Bindable] private var linkButtonOff: String = 'linkButtonOff' ; private function setType(result: Event):void { result.currentTarge t.styleName = linkButtonOff; } How can I automatically reset all the other linkButtons styleNames to "{linkButton} " when a linkButton is clicked? Thank you. This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.
Re: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
Hi Tracy, I created an array of all the IDs of my linkButtons, can you show me an example how to loop in the array? Thanks. From: Tracy Spratt To: flexcoders@yahoogroups.com Sent: Friday, February 13, 2009 4:11:05 PM Subject: RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames. Store references to each in an Array, then loop over the array. Tracy Spratt Lariat Services Flex development bandwidth available From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of sailorsea21 Sent: Friday, February 13, 2009 4:01 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] DYNAMIC LINKBUTTONS styleNames. I have a series of 3 linkButtons. I am able to switch the styleName of a linkButton when I click on it as follows: [Bindable] private var linkButton:String = 'linkButton' ; [Bindable] private var linkButtonOff: String = 'linkButtonOff' ; private function setType(result: Event):void { result.currentTarge t.styleName = linkButtonOff; } How can I automatically reset all the other linkButtons styleNames to "{linkButton} " when a linkButton is clicked? Thank you.
RE: [flexcoders] DYNAMIC LINKBUTTONS styleNames.
Store references to each in an Array, then loop over the array. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of sailorsea21 Sent: Friday, February 13, 2009 4:01 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] DYNAMIC LINKBUTTONS styleNames. I have a series of 3 linkButtons. I am able to switch the styleName of a linkButton when I click on it as follows: [Bindable] private var linkButton:String = 'linkButton'; [Bindable] private var linkButtonOff:String = 'linkButtonOff'; private function setType(result:Event):void { result.currentTarget.styleName = linkButtonOff; } How can I automatically reset all the other linkButtons styleNames to "{linkButton}" when a linkButton is clicked? Thank you.