Thanks Om. Yes, that was the source of the code I mentioned. Problem comes when I try and call it using AS3. In MXML, it works as expected by adding a ToggleSwitch component and then adding a skinclass = skins.togYesNo. But when I add it using AS3 (which I need to do, because the rest of the page is built dynamically at runtime) I just get a non-working toggle. I load it with: <pre> var myTog:skins.togYesNo = new togYesNo(); group.addElement(myTog); </pre>
... which shows the toggle in the correct place, but not working. ie in the on position but not highlighted, and interactive at all. I also tried adding the style directly to it, with: <pre> myTog.setStyle('skinClass',skins.togYesNo); </pre> I must be missing something, as Im sure that Im not the first person to want to add a ToggleSwitch using AS3!! It seems like such a simple thing (adding a Yes No toggle in code) but I cant find much about it on the web, and a deadline looms... Happy to post all code here if it helps. Thanks very much for any insight. -- View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Custom-ToggleSwitch-in-code-tp46201p46203.html Sent from the Apache Flex Development mailing list archive at Nabble.com.